#include using namespace std; using ll = long long; int days[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int Y, M, D; int main() { string s; cin >> s; sscanf(s.c_str(), "%d/%d/%d", &Y, &M, &D); if (Y % 4 == 0 && !(Y % 100 == 0 && Y % 400 != 0)) days[2] = 29; D += 2; if (days[M] < D) { D -= days[M]; M++; if (12 < M) { Y++; M = 1; } } printf("%04d/%02d/%02d\n", Y, M, D); }