N=int(input ()) R=N+90 R%=2 if R==0: print (N+90) else: print (N+91)