#![allow(non_snake_case)] use proconio::*; // https://maguro.dev/blog/debug-macro/ #[allow(unused_macros)] macro_rules! debug { ($($a:expr),* $(,)*) => { #[cfg(debug_assertions)] eprintln!(concat!($("| ", stringify!($a), " = {:?} "),*, "|"), $(&$a),*); }; } fn main() { std::thread::Builder::new() .stack_size(256 * 1024 * 1024) .spawn(solve) .unwrap() .join() .unwrap(); } fn solve() { input! { n: usize, a: usize, b: usize } let res = (1..=n).filter(|&u| u % a > u % b).count(); println!("{res}"); }