y,m,d=map(int,input().split('/')) days={1:31,2:28,3:31,4:30,5:31,6:30,7:31,8:31,9:30,10:31,11:30,12:31} if y%4==0: if y%400==0: days[2]=29 elif y%100>0: days[2]=29 if d+2>days[m]: if m==12: y+=1 m=1 d-=29 else: d+=2-days[m] m+=1 else: d+=2 print('{:04}/{:02}/{:02}'.format(y,m,d))