N=int(input()) if N<=3: print(N) else: N=N-3 print(5*N+3)