#include <bits/stdc++.h> 
#define ll long long
using namespace std;
int main(){
	ll n,a,b;
	cin>>n>>a>>b;
	if(a==0)cout<<'0'<<endl;
	else{
		ll sh=n/(a+b);
		if(sh==0)cout<<n<<endl;
		else{
			ll yu=n%(a+b);
			double m=a*1.0/(a+b)*1.0; 
			ll ans;
			if(yu<=a)
				ans=m*n+yu;
			else ans=(m+1)*a;
			cout<<ans<<endl;
		}
	}
	return 0;
} 