#include #include #include #include #include #include using namespace std; typedef long long ll; typedef unsigned long long ull; #define max(x,y) (((x)>(y)) ? x:y) #define min(x,y) (((x)<(y)) ? x:y) #define FOR(a,b,c) for(b=(c);b<(a);b++) #define ender {return 0;} #define tosasuretu(a) (a*(a+1)/2) inline long kaizyo(long); int main() { int y, m, d; char a; cin >> y >> a >> m >> a >> d; d += 2; int maxd; switch (m) { case 2: maxd = 28; if (y % 4 == 0) { if (y % 100 != 0) { maxd = 29; } if (y % 400 == 0) { maxd = 29; } } break; case 4: case 6: case 9: case 11: maxd = 30; break; default: maxd = 31; break; } if (maxd < d) { m += 1; d -= maxd; if (m > 12) { m -= 12; y++; } } return 0; } inline long kaizyo(long x) { long ans = 1; for (int z = 0; z < x; z++) { ans *= (x - z); } return ans; }