import java.util.Scanner;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long A = sc.nextLong();
        long B = sc.nextLong();
      	//System.out.println(N);
      	//System.out.println(A);
        //System.out.println(B);
        long a = N/(A+B);
        long b = N%(A+B);
        //System.out.println(a +""+ b);
        if(b > A){
            System.out.print(A*a+A);
        }else{
            System.out.print(A*a+b);
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long A = sc.nextLong();
        long B = sc.nextLong();
      	//System.out.println(N);
      	//System.out.println(A);
        //System.out.println(B);
        long a = N/(A+B);
        long b = N%(A+B);
        //System.out.println(a +""+ b);
        if(b > A){
            System.out.print(A*a+A);
        }else{
            System.out.print(A*a+b);
        }
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long A = sc.nextLong();
        long B = sc.nextLong();
      	//System.out.println(N);
      	//System.out.println(A);
        //System.out.println(B);
        long a = N/(A+B);
        long b = N%(A+B);
        //System.out.println(a +""+ b);
        if(b > A){
            System.out.print(A*a+A);
        }else{
            System.out.print(A*a+b);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long A = sc.nextLong();
        long B = sc.nextLong();
      	//System.out.println(N);
      	//System.out.println(A);
        //System.out.println(B);
        long a = N/(A+B);
        long b = N%(A+B);
        //System.out.println(a +""+ b);
        if(b > A){
            System.out.print(A*a+A);
        }else{
            System.out.print(A*a+b);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) 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 a = N/(A+B); a N/(A+B) N (A+B) A B long b = N%(A+B); b N%(A+B) N (A+B) A B if(b > A){
            System.out.print(A*a+A);
        }else{
            System.out.print(A*a+b);
        } b > A b A {
            System.out.print(A*a+A);
        } System.out.print(A*a+A) System.out.print System.out System System.out A*a+A A*a A a A {
            System.out.print(A*a+b);
        } System.out.print(A*a+b) System.out.print System.out System System.out A*a+b A*a A a b String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long A = sc.nextLong();
        long B = sc.nextLong();
      	//System.out.println(N);
      	//System.out.println(A);
        //System.out.println(B);
        long a = N/(A+B);
        long b = N%(A+B);
        //System.out.println(a +""+ b);
        if(b > A){
            System.out.print(A*a+A);
        }else{
            System.out.print(A*a+b);
        }
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long A = sc.nextLong();
        long B = sc.nextLong();
      	//System.out.println(N);
      	//System.out.println(A);
        //System.out.println(B);
        long a = N/(A+B);
        long b = N%(A+B);
        //System.out.println(a +""+ b);
        if(b > A){
            System.out.print(A*a+A);
        }else{
            System.out.print(A*a+b);
        }
    }
} Main
import java.util.Scanner;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long A = sc.nextLong();
        long B = sc.nextLong();
      	//System.out.println(N);
      	//System.out.println(A);
        //System.out.println(B);
        long a = N/(A+B);
        long b = N%(A+B);
        //System.out.println(a +""+ b);
        if(b > A){
            System.out.print(A*a+A);
        }else{
            System.out.print(A*a+b);
        }
    }
}