#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define TOSTRING(x) #x #define SZ(x) (int)(x).size() #define REP(i,n) for(int i=0;i<(n);i++) #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define ALL(s) (s).begin(), (s).end() #define so(V) sort(ALL(V)) #define rev(V) reverse(ALL(V)) #define uni(v) v.erase( unique(ALL(v)) , v.end()); #define PAU system("pause") typedef long long unsigned int llu; typedef long long ll; typedef vector vi; typedef vector vll; typedef vector > vvi; const int EPS = 1e-9; const int MOD = 1e9 + 7; const int INF = (1 << 30); const double PI = acos(-1); int main() { cin.tie(0); ios::sync_with_stdio(false); int Y, M, D; scanf("%4d/%2d/%2d", &Y, &M, &D); int days[] = { 31,28,31,30,31,30,31,31,30,31,30,31 }; D += 2; if (M == 2) { if (Y % 400 == 0) { if (D > 29) { M++; D -= 29; } } else if (Y % 100 == 0) { if (D > 28) { M++; D -= 28; } } else if (Y % 4 == 0) { if (D > 29) { M++; D -= 29; } } else { if (D > 28) { M++; D -= 28; } } } else { if (days[M - 1] < D) { D -= days[M - 1]; M++; } } if (M == 13) { Y++; M = 1; } printf("%04d/%02d/%02d\n", Y, M, D); PAU; return 0; }