#include #define rep(i, a, n) for(int i = a; i < n; i++) using namespace std; bool leap_year(int y){ return ((y % 4 == 0 && y % 100 != 0) || y % 400 == 0); } int days[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int days2[] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; signed main(){ int y, m, d; scanf("%d/%d/%d", &y, &m, &d); d += 2; if(leap_year(y)){ if(days2[m - 1] < d){ d -= days2[m - 1]; m++; } }else{ if(days[m - 1] < d){ d -= days[m - 1]; m++; } } if(m > 12){ m -= 12; y++; } printf("%d/%02d/%02d\n", y, m, d); }