import 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();
        long quotient = n / (a + b);
        long mod = n % (a + b);
        if(a<=mod){
            System.out.println(quotient*a + a);
        }else {
            System.out.println(quotient*a + mod);
        }
    }
} import java.util.*; util.* java 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();
        long quotient = n / (a + b);
        long mod = n % (a + b);
        if(a<=mod){
            System.out.println(quotient*a + a);
        }else {
            System.out.println(quotient*a + mod);
        }
    }
} 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();
        long quotient = n / (a + b);
        long mod = n % (a + b);
        if(a<=mod){
            System.out.println(quotient*a + a);
        }else {
            System.out.println(quotient*a + mod);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long a = sc.nextLong();
        long b = sc.nextLong();
        long quotient = n / (a + b);
        long mod = n % (a + b);
        if(a<=mod){
            System.out.println(quotient*a + a);
        }else {
            System.out.println(quotient*a + mod);
        }
    } 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 quotient = n / (a + b); quotient n / (a + b) n (a + b) a b long mod = n % (a + b); mod n % (a + b) n (a + b) a b if(a<=mod){
            System.out.println(quotient*a + a);
        }else {
            System.out.println(quotient*a + mod);
        } a<=mod a mod {
            System.out.println(quotient*a + a);
        } System.out.println(quotient*a + a) System.out.println System.out System System.out quotient*a + a quotient*a quotient a a {
            System.out.println(quotient*a + mod);
        } System.out.println(quotient*a + mod) System.out.println System.out System System.out quotient*a + mod quotient*a quotient a mod 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();
        long quotient = n / (a + b);
        long mod = n % (a + b);
        if(a<=mod){
            System.out.println(quotient*a + a);
        }else {
            System.out.println(quotient*a + mod);
        }
    }
} 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();
        long quotient = n / (a + b);
        long mod = n % (a + b);
        if(a<=mod){
            System.out.println(quotient*a + a);
        }else {
            System.out.println(quotient*a + mod);
        }
    }
} Main
import 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();
        long quotient = n / (a + b);
        long mod = n % (a + b);
        if(a<=mod){
            System.out.println(quotient*a + a);
        }else {
            System.out.println(quotient*a + mod);
        }
    }
}