#include <bits/stdc++.h> 
#define ll long long 
using namespace std;
int main(){
	ll n,a,b,j=0;
	ll ans=0;
	ll su=0;
	cin>>n>>a>>b;
	while(1){
		if(su>=n)break;
		su+=a+b;
		ans+=a;
		j++;
	}
	if(su==n||n>=(j-1)*(a+b)+a)cout<<ans<<endl;
	else cout<<ans+n-a*j-b*j+b<<endl;
	return 0;
} 