#include using namespace std; typedef long long ll; typedef pair P; #define REP(i,n) for(ll i=0;i> N >> A >> B; ll ans=0; for(i=1;i<=N;i++){ if(i%A > i%B) ans++; } cout << ans << endl; return 0; }