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

void main() {
  long n, a, b;
  readf (" %d %d %d", &n, &a, &b);
  long res;
  long s = a + b;
  long u = n / s;
  long v = n % s;
  res += min (v, a);
  res += u * a;
  writeln (res);
}

