y, m, d = map(int, input().split('/')) uruu = False if y%4 == 0 and not (y%100 == 0 and y%400 != 0): uruu = True nd = d+2 if m == 2: if uruu: if nd > 29: nd %= 29 m += 1 else: if nd > 28: nd %= 28 m += 1 elif m in {4, 6, 9, 11}: if nd > 30: nd %= 30 m += 1 elif m != 12: if nd > 31: nd %= 31 m += 1 else: if nd > 31: y += 1 m = 1 nd %= 31 y, m, d = str(y), str(m), str(nd) ans = y.zfill(4)+'/'+m.zfill(2)+'/'+d.zfill(2) print(ans)