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 or Y % 100 == 0 or Y % 400 == 0: 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))