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