import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    long n = Long.parseLong(str[0]);
    long a = Long.parseLong(str[1]);
    long b = Long.parseLong(str[2]);
    long quo = n/(a+b);
    long rem = n%(a+b);
    //System.out.println(quo + " " + rem);
    if(rem>a)
      System.out.println(quo*a + a);
    else
      System.out.println(quo*a + rem);
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    long n = Long.parseLong(str[0]);
    long a = Long.parseLong(str[1]);
    long b = Long.parseLong(str[2]);
    long quo = n/(a+b);
    long rem = n%(a+b);
    //System.out.println(quo + " " + rem);
    if(rem>a)
      System.out.println(quo*a + a);
    else
      System.out.println(quo*a + rem);
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    long n = Long.parseLong(str[0]);
    long a = Long.parseLong(str[1]);
    long b = Long.parseLong(str[2]);
    long quo = n/(a+b);
    long rem = n%(a+b);
    //System.out.println(quo + " " + rem);
    if(rem>a)
      System.out.println(quo*a + a);
    else
      System.out.println(quo*a + rem);
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    long n = Long.parseLong(str[0]);
    long a = Long.parseLong(str[1]);
    long b = Long.parseLong(str[2]);
    long quo = n/(a+b);
    long rem = n%(a+b);
    //System.out.println(quo + " " + rem);
    if(rem>a)
      System.out.println(quo*a + a);
    else
      System.out.println(quo*a + rem);
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String[] str = in.readLine().split(" "); str in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " long n = Long.parseLong(str[0]); n Long.parseLong(str[0]) Long.parseLong Long str[0] str 0 long a = Long.parseLong(str[1]); a Long.parseLong(str[1]) Long.parseLong Long str[1] str 1 long b = Long.parseLong(str[2]); b Long.parseLong(str[2]) Long.parseLong Long str[2] str 2 long quo = n/(a+b); quo n/(a+b) n (a+b) a b long rem = n%(a+b); rem n%(a+b) n (a+b) a b if(rem>a)
      System.out.println(quo*a + a);
    else
      System.out.println(quo*a + rem); rem>a rem a System.out.println(quo*a + a) System.out.println System.out System System.out quo*a + a quo*a quo a a System.out.println(quo*a + rem) System.out.println System.out System System.out quo*a + rem quo*a quo a rem String[] args args public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    long n = Long.parseLong(str[0]);
    long a = Long.parseLong(str[1]);
    long b = Long.parseLong(str[2]);
    long quo = n/(a+b);
    long rem = n%(a+b);
    //System.out.println(quo + " " + rem);
    if(rem>a)
      System.out.println(quo*a + a);
    else
      System.out.println(quo*a + rem);
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    long n = Long.parseLong(str[0]);
    long a = Long.parseLong(str[1]);
    long b = Long.parseLong(str[2]);
    long quo = n/(a+b);
    long rem = n%(a+b);
    //System.out.println(quo + " " + rem);
    if(rem>a)
      System.out.println(quo*a + a);
    else
      System.out.println(quo*a + rem);
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    long n = Long.parseLong(str[0]);
    long a = Long.parseLong(str[1]);
    long b = Long.parseLong(str[2]);
    long quo = n/(a+b);
    long rem = n%(a+b);
    //System.out.println(quo + " " + rem);
    if(rem>a)
      System.out.println(quo*a + a);
    else
      System.out.println(quo*a + rem);
  }
}