N = int(input()) q, r = divmod(N, 15) print((q * 16) + (r // 3 + r // 5) * 2)