#include using namespace std; bool LeapYear(int64_t n) { if(n % 400== 0) return true; if(n % 100== 0) return false; if(n % 4 == 0) return true; return false; } void tomorrow(int& y, int& m, int& d) { const int day[] = {-1, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; ++d; if(d > day[m]) { if((not LeapYear(y)) or (not (m == 2))) { d = 1; m++; if(m > 12) m = 1; } else { if(d > 29) { d = 1; m = 3; } } } if(m == 1 and d == 1) { y++; } } int main() { int y, m, d; char _; cin >> y >> _ >> m >> _ >> d; tomorrow(y, m, d); tomorrow(y, m, d); printf("%04d/%02d/%02d\n", y, m, d); return 0; }