#include using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) #define ALL(v) begin(v),end(v) template inline bool chmax(A & a, const B & b) { if (a < b) { a = b; return true; } return false; } template inline bool chmin(A & a, const B & b) { if (a > b) { a = b; return true; } return false; } using ll = long long; using pii = pair; constexpr ll INF = 1ll<<30; constexpr ll longINF = 1ll<<60; constexpr ll MOD = 1000000007; constexpr bool debug = false; //---------------------------------// int main() { int y, m, d; scanf("%d/%d/%d", &y, &m, &d); auto isleap = [](int y) { if (y % 4 != 0) return false; if (y % 400 == 0) return true; if (y % 100 == 0) return false; return true; }; auto add = [isleap](int & y, int & m, int & d) { if (d == 31 || (d == 30 && (m == 4 || m == 6 || m == 9 || m == 11))) { ++m; d = 1; } else if (m == 2) { if (d == 29) { ++m; d = 1; } else if (d == 28) { if (isleap(y)) ++d; else { ++m; d = 1; } } else ++d; } else ++d; if (m == 13) { ++y; m = 1; } }; REP(i, 2) add(y, m, d); printf("%04d/%02d/%02d\n", y, m, d); }