import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines N = int(read()) FB = N//15 F = N//3 - FB B = N//5 - FB answer = FB*4 + B*2 + F*2 print(answer)