#include using namespace std; int main(){ int N,A,B;cin>>N>>A>>B; int ans=0; for(int n=1;n<=N;n++){ if(n%A>n%B) ans++; } cout<