n = int(input()) div3 = (n - (n % 3)) / 3 div5 = (n - (n % 5)) / 5 z_count = (div3 + div5) * 2 print(int(z_count))