#define _USE_MATH_DEFINES #include //cin, cout #include //vector #include //sort,min,max,count #include //string,getline, to_string #include //abs(int) #include //swap, pair #include //deque #include //INT_MAX #include //bitset #include //sqrt, ceil. M_PI, pow, sin #include //fixed #include //setprecision #include //stringstream #include //gcd, assumlate #include //randam_device #include //numeric_limits using namespace std; constexpr int64_t D_MOD = 1000000007; inline bool JudgeLeapYear(int year) { bool flg = false; if (year % 4 == 0) { flg = true; if (year % 100 == 0) { flg = false; if (year % 400 == 0) { flg = true; } } } return(flg); } int main() { string Y, M, D; char c; for (int i = 0; i < 4; i++) { cin >> c; Y.push_back(c); } cin >> c; for (int i = 0; i < 2; i++) { cin >> c; M.push_back(c); } cin >> c; for (int i = 0; i < 2; i++) { cin >> c; D.push_back(c); } int yy = stoi(Y), mm = stoi(M), dd = stoi(D); bool flg_u = JudgeLeapYear(yy); if (dd <= 26) { dd += 2; } else if (dd == 27) { if (mm != 2) { dd = 29; } else if (mm == 2 && flg_u) { dd = 29; } else { mm = 3; dd = 1; } } else if (dd == 28) { if (mm != 2) { dd = 30; } else if (mm == 2 && flg_u) { mm = 3; dd = 1; } else { mm = 3; dd = 2; } } else if (dd == 29) { if (mm == 2 && flg_u) { mm = 3; dd = 2; } else if (mm == 4 || mm == 6 || mm == 9 || mm == 11) { mm++; dd = 1; } else { dd = 31; } } else if (dd == 30) { if (mm == 4 || mm == 6 || mm == 9 || mm == 11) { mm++; dd = 2; } else if (mm == 12) { yy++; mm = 1; dd = 1; } else { dd = 1; } } else { if (mm == 12) { yy++; mm = 1; dd = 2; } else { dd = 2; } } cout << yy << "/"; if (mm < 10) { cout << 0; } cout << mm << "/"; if (dd < 10) { cout << 0; } cout << dd << endl; return 0; }