import java.util.*;

public class Main{
    public static void main(String[]args){
        Scanner sc = new Scanner(System.in);
        long a=sc.nextLong();
        long b=sc.nextLong();
        long c=sc.nextLong();
        long d=0,e=0;
        d=a%(b+c);
        e=a/(b+c);
        if(d>=b)
        System.out.println(e*b+b);
        else
        System.out.println(e*b+d);
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[]args){
        Scanner sc = new Scanner(System.in);
        long a=sc.nextLong();
        long b=sc.nextLong();
        long c=sc.nextLong();
        long d=0,e=0;
        d=a%(b+c);
        e=a/(b+c);
        if(d>=b)
        System.out.println(e*b+b);
        else
        System.out.println(e*b+d);
    }
} Main public static void main(String[]args){
        Scanner sc = new Scanner(System.in);
        long a=sc.nextLong();
        long b=sc.nextLong();
        long c=sc.nextLong();
        long d=0,e=0;
        d=a%(b+c);
        e=a/(b+c);
        if(d>=b)
        System.out.println(e*b+b);
        else
        System.out.println(e*b+d);
    } main {
        Scanner sc = new Scanner(System.in);
        long a=sc.nextLong();
        long b=sc.nextLong();
        long c=sc.nextLong();
        long d=0,e=0;
        d=a%(b+c);
        e=a/(b+c);
        if(d>=b)
        System.out.println(e*b+b);
        else
        System.out.println(e*b+d);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a=sc.nextLong(); a sc.nextLong() sc.nextLong sc long b=sc.nextLong(); b sc.nextLong() sc.nextLong sc long c=sc.nextLong(); c sc.nextLong() sc.nextLong sc long d=0 d 0 e=0; e 0 d=a%(b+c) d a%(b+c) a (b+c) b c e=a/(b+c) e a/(b+c) a (b+c) b c if(d>=b)
        System.out.println(e*b+b);
        else
        System.out.println(e*b+d); d>=b d b System.out.println(e*b+b) System.out.println System.out System System.out e*b+b e*b e b b System.out.println(e*b+d) System.out.println System.out System System.out e*b+d e*b e b d String[]args args public class Main{
    public static void main(String[]args){
        Scanner sc = new Scanner(System.in);
        long a=sc.nextLong();
        long b=sc.nextLong();
        long c=sc.nextLong();
        long d=0,e=0;
        d=a%(b+c);
        e=a/(b+c);
        if(d>=b)
        System.out.println(e*b+b);
        else
        System.out.println(e*b+d);
    }
} public class Main{
    public static void main(String[]args){
        Scanner sc = new Scanner(System.in);
        long a=sc.nextLong();
        long b=sc.nextLong();
        long c=sc.nextLong();
        long d=0,e=0;
        d=a%(b+c);
        e=a/(b+c);
        if(d>=b)
        System.out.println(e*b+b);
        else
        System.out.println(e*b+d);
    }
} Main
import java.util.*;

public class Main{
    public static void main(String[]args){
        Scanner sc = new Scanner(System.in);
        long a=sc.nextLong();
        long b=sc.nextLong();
        long c=sc.nextLong();
        long d=0,e=0;
        d=a%(b+c);
        e=a/(b+c);
        if(d>=b)
        System.out.println(e*b+b);
        else
        System.out.println(e*b+d);
    }
}