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