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