#include #include #include #include #include #include #include #include using namespace std; using ll = long long; int main() { string s; cin >> s; for (auto& c : s) { c -= '0'; } int p[13] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; int y, m, d; y = s[0] * 1000 + s[1] * 100 + s[2] * 10 + s[3]; m = s[5] * 10 + s[6]; d = s[8] * 10 + s[9]; if (y % 4 == 0 && !(y % 100 == 0 && y % 400 != 0)) p[2] = 29; d += 2; if (d > p[m]) { d -= p[m]; m++; if (m > 12) { m -= 12; y++; } } printf("%04d/%02d/%02d\n", y, m, d); return 0; }