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