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