#include using namespace std; int main(){ int d, a, b; cin >> d >> a >> b; int x = (b * d + (a + b) / 2) / (a + b); cout << x * a + (d - x) * b; }