count_div = lambda x, y: int(not(x % y)) * x // y N = int(input()) print((count_div(N, 3) + count_div(N, 5))*2)