N = int(input()) if N <= 5: print(N) else: K = N * 7 - 36 print(K)