import std.stdio, std.conv, std.string, std.algorithm, std.math, std.array;

long n, a, b;

long solve() {
  return n/(a+b)*a + min(a, n%(a+b));
}

void main() {
  readf("%d %d %d", &n, &a, &b);
  writeln(solve());
}

