import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) { long n = Long.parseLong(br.readLine()); long cnt = 0; for (long i = 1; i < n + 1; i++) { if (i % 15 == 0) { cnt += 4; // FizzBuzz } else if (i % 3 == 0 || i % 5 == 0) { cnt += 2; // Fizz or Buzz } else { } } System.out.println(cnt); } catch (IOException e) { e.printStackTrace(); } } }