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