#include <iostream>
#include <vector>
using namespace std;
bool isLeap(int y){
return (y % 400 == 0 || (y % 4 == 0 && y % 100 != 0));
}
signed main(){
string s, cur;
cin >> s;
vector<int> d;
for(int i = 0; i < s.length(); i++){
if(s[i] == '.'){
d.push_back(stoi(cur));
cur.clear();
}
else
cur += s[i];
}
d.push_back(stoi(cur));
int k = d[0];
d[1]--;
while(d[1] > 0){
if(d[1] == 2) k += 28 + isLeap(d[2]);
else if((d[1] < 8 && d[1] % 2 == 1) || (d[1] >= 8 && d[1] % 2 == 0)) k += 31;
else k += 30;
d[1]--;
}
cout << (365 + isLeap(d[2])) - k + 1;
}
#include <iostream>
#include <string>
#include <vector>
#include <utility>
int main()
{
std::vector<std::pair<std::string, std::string>> deriv_sheet = {
std::make_pair("2x^5", "10x^4"),
std::make_pair("cosx", "-sinx")
};
std::string user_fx;
std::cin >> user_fx;
for (const auto& i : deriv_sheet )
if (i.first.compare(user_fx) == 0)
std::cout << i.second;
}