S = input() i = S.index("/") j = S[i + 1:].index("/") j += i + 1 y = int(S[:i]) m = int(S[i + 1:j]) d = int(S[j + 1:]) d += 2 th = [2, 4, 6, 9, 11] if m == 2: if y % 400 == 0 or (y % 4 == 0 and y % 100 != 0): m += (d - 1) // 29 d = 1 + (d - 1) % 29 else: m += (d - 1) // 28 d = 1 + (d - 1) % 28 elif m in th: m += (d - 1) // 30 d = 1 + (d - 1) % 30 else: m += (d - 1) // 31 d = 1 + (d - 1) % 31 y += (m - 1) // 12 m = 1 + (m - 1) % 12 print(y, end = "/") if m < 10: print(str(0), end = "") print(m, end = "/") if d < 10: print(0, end = "") print(d)