#include using namespace std; bool IsLeapYear(int year); int main() { string s; cin >> s; string tmp = ""; vector v; for (int i = 0; i < s.length(); i++) { if (s[i] == '/') { v.push_back(tmp); tmp = ""; } else { tmp += s[i]; } } v.push_back(tmp); int year = stoi(v[0]); int month = stoi(v[1]); int day = stoi(v[2]) + 2; if (month == 2) { if (IsLeapYear(year)) { if (day > 29) { month++; day -= 29; } } else { if (day > 28) { month++; day -= 28; } } } else if ((month == 4 || month == 6 || month == 9 || month == 11) && day > 30) { month++; day -= 30; } else if (day > 31) { if (month == 12) { year++; } month = (month + 1) % 12; day -= 31; } cout << year << "/"; cout << setfill('0') << std::right << setw(2) << month << "/" ; cout << setfill('0') << std::right << setw(2) << day << endl; return 0; } bool IsLeapYear (int year) { bool ret = false; if (year % 4 == 0) { if (year % 100 == 0) { if (year % 400 == 0) { ret = true; } } else { ret = true; } } return ret; }