import java.util.Scanner;

public class Main {

    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
    	long n = sc.nextLong();
      	long a = sc.nextLong();
      	long b = sc.nextLong();

      	long period = n / (a + b);
      	long remainder = n % (a + b);

      	long ans = remainder > a ? period * a + a : period * a + remainder;

      	System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
    	long n = sc.nextLong();
      	long a = sc.nextLong();
      	long b = sc.nextLong();

      	long period = n / (a + b);
      	long remainder = n % (a + b);

      	long ans = remainder > a ? period * a + a : period * a + remainder;

      	System.out.println(ans);
    }
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
    	long n = sc.nextLong();
      	long a = sc.nextLong();
      	long b = sc.nextLong();

      	long period = n / (a + b);
      	long remainder = n % (a + b);

      	long ans = remainder > a ? period * a + a : period * a + remainder;

      	System.out.println(ans);
    } main {
    	long n = sc.nextLong();
      	long a = sc.nextLong();
      	long b = sc.nextLong();

      	long period = n / (a + b);
      	long remainder = n % (a + b);

      	long ans = remainder > a ? period * a + a : period * a + remainder;

      	System.out.println(ans);
    } long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc long a = sc.nextLong(); a sc.nextLong() sc.nextLong sc long b = sc.nextLong(); b sc.nextLong() sc.nextLong sc long period = n / (a + b); period n / (a + b) n (a + b) a b long remainder = n % (a + b); remainder n % (a + b) n (a + b) a b long ans = remainder > a ? period * a + a : period * a + remainder; ans remainder > a ? period * a + a : period * a + remainder remainder > a remainder a period * a + a period * a period a a period * a + remainder period * a period a remainder System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
    	long n = sc.nextLong();
      	long a = sc.nextLong();
      	long b = sc.nextLong();

      	long period = n / (a + b);
      	long remainder = n % (a + b);

      	long ans = remainder > a ? period * a + a : period * a + remainder;

      	System.out.println(ans);
    }
} public class Main {

    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
    	long n = sc.nextLong();
      	long a = sc.nextLong();
      	long b = sc.nextLong();

      	long period = n / (a + b);
      	long remainder = n % (a + b);

      	long ans = remainder > a ? period * a + a : period * a + remainder;

      	System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {

    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
    	long n = sc.nextLong();
      	long a = sc.nextLong();
      	long b = sc.nextLong();

      	long period = n / (a + b);
      	long remainder = n % (a + b);

      	long ans = remainder > a ? period * a + a : period * a + remainder;

      	System.out.println(ans);
    }
}