Y, M, D = map(int, input().split('/')) L = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] if Y % 4 == 0 and Y != 2100 and Y != 2200 and Y != 2300: L[2] = 29 DD = D + 2 if L[M] >= DD: print('{:0=2}/{:0=2}/{:0=2}'.format(Y, M, DD)) elif L[M] < DD and M < 12: print('{:0=2}/{:0=2}/{:0=2}'.format(Y, M+1, DD-L[M])) else: print('{:0=2}/{:0=2}/{:0=2}'.format(Y+1, 1, DD-31))