import java.util.Scanner;
public class Main{
    public static void main(String[]args){
        Scanner scan = new Scanner(System.in);
        long n,a,b,tmp;
        n=scan.nextLong();
        a=scan.nextLong();
        b=scan.nextLong();
        tmp=n/(a+b);
        tmp*=a;
        if(n%(a+b)<a) tmp+=n%(a+b);
        else tmp+=a;
        System.out.println(tmp);
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[]args){
        Scanner scan = new Scanner(System.in);
        long n,a,b,tmp;
        n=scan.nextLong();
        a=scan.nextLong();
        b=scan.nextLong();
        tmp=n/(a+b);
        tmp*=a;
        if(n%(a+b)<a) tmp+=n%(a+b);
        else tmp+=a;
        System.out.println(tmp);
    }
} Main public static void main(String[]args){
        Scanner scan = new Scanner(System.in);
        long n,a,b,tmp;
        n=scan.nextLong();
        a=scan.nextLong();
        b=scan.nextLong();
        tmp=n/(a+b);
        tmp*=a;
        if(n%(a+b)<a) tmp+=n%(a+b);
        else tmp+=a;
        System.out.println(tmp);
    } main {
        Scanner scan = new Scanner(System.in);
        long n,a,b,tmp;
        n=scan.nextLong();
        a=scan.nextLong();
        b=scan.nextLong();
        tmp=n/(a+b);
        tmp*=a;
        if(n%(a+b)<a) tmp+=n%(a+b);
        else tmp+=a;
        System.out.println(tmp);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long n n a a b b tmp; tmp n=scan.nextLong() n scan.nextLong() scan.nextLong scan a=scan.nextLong() a scan.nextLong() scan.nextLong scan b=scan.nextLong() b scan.nextLong() scan.nextLong scan tmp=n/(a+b) tmp n/(a+b) n (a+b) a b tmp*=a tmp a if(n%(a+b)<a) tmp+=n%(a+b);
        else tmp+=a; n%(a+b)<a n%(a+b) n (a+b) a b a tmp+=n%(a+b) tmp n%(a+b) n (a+b) a b tmp+=a tmp a System.out.println(tmp) System.out.println System.out System System.out tmp String[]args args public class Main{
    public static void main(String[]args){
        Scanner scan = new Scanner(System.in);
        long n,a,b,tmp;
        n=scan.nextLong();
        a=scan.nextLong();
        b=scan.nextLong();
        tmp=n/(a+b);
        tmp*=a;
        if(n%(a+b)<a) tmp+=n%(a+b);
        else tmp+=a;
        System.out.println(tmp);
    }
} public class Main{
    public static void main(String[]args){
        Scanner scan = new Scanner(System.in);
        long n,a,b,tmp;
        n=scan.nextLong();
        a=scan.nextLong();
        b=scan.nextLong();
        tmp=n/(a+b);
        tmp*=a;
        if(n%(a+b)<a) tmp+=n%(a+b);
        else tmp+=a;
        System.out.println(tmp);
    }
} Main
import java.util.Scanner;
public class Main{
    public static void main(String[]args){
        Scanner scan = new Scanner(System.in);
        long n,a,b,tmp;
        n=scan.nextLong();
        a=scan.nextLong();
        b=scan.nextLong();
        tmp=n/(a+b);
        tmp*=a;
        if(n%(a+b)<a) tmp+=n%(a+b);
        else tmp+=a;
        System.out.println(tmp);
    }
}