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