#include using namespace std; int main() { int days[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int y, m, d; char deli; cin >> y >> deli >> m >> deli >> d; d += 2; // うるう年チェック if ((y % 4 == 0 and y % 100 != 0) or y % 400 == 0) { days[2]++; } if (d > days[m]) {//月が変わる d -= days[m]; m++; } if (m == 13) {//年が変わる m = 1; y++; } printf("%04d/%02d/%02d\n", y, m, d); return 0; }