#include using namespace std; using ll=long long; const int INF=1e9; /* Library: https://yukicoder.me/users/24530/ai_code */ int main() { cin.tie(nullptr),cout.tie(nullptr); ios::sync_with_stdio(false); int n,a,b; cin >> n >> a >> b; int kai=0; for(int i=1; i<=n; i++){ if(i%a>i%b){ kai++; } } cout << kai << endl; }