import std.stdio;

void main() {
	long n, a, b;

	readf(" %s %s %s", &n, &a, &b);

	long balls = (n / (a + b)) * a;

	long mod = n % (a + b);
	if (mod > a) {
		balls += a;
	} else {
		balls += mod;
	}

	writeln(balls);
}
