import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        long n = scanner.nextLong();
        long A = scanner.nextLong();
        long B = scanner.nextLong();
 
        long s = n / (A + B);
        long t = n % (A + B);
        long count = 0;
 
        count = s * A;
        if(t >= A){
            count += A;
        }else{
            count += t;
        }
        System.out.println(count);
        
	}
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        long n = scanner.nextLong();
        long A = scanner.nextLong();
        long B = scanner.nextLong();
 
        long s = n / (A + B);
        long t = n % (A + B);
        long count = 0;
 
        count = s * A;
        if(t >= A){
            count += A;
        }else{
            count += t;
        }
        System.out.println(count);
        
	}
} Main public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        long n = scanner.nextLong();
        long A = scanner.nextLong();
        long B = scanner.nextLong();
 
        long s = n / (A + B);
        long t = n % (A + B);
        long count = 0;
 
        count = s * A;
        if(t >= A){
            count += A;
        }else{
            count += t;
        }
        System.out.println(count);
        
	} main {
        Scanner scanner = new Scanner(System.in);

        long n = scanner.nextLong();
        long A = scanner.nextLong();
        long B = scanner.nextLong();
 
        long s = n / (A + B);
        long t = n % (A + B);
        long count = 0;
 
        count = s * A;
        if(t >= A){
            count += A;
        }else{
            count += t;
        }
        System.out.println(count);
        
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) long n = scanner.nextLong(); n scanner.nextLong() scanner.nextLong scanner long A = scanner.nextLong(); A scanner.nextLong() scanner.nextLong scanner long B = scanner.nextLong(); B scanner.nextLong() scanner.nextLong scanner long s = n / (A + B); s n / (A + B) n (A + B) A B long t = n % (A + B); t n % (A + B) n (A + B) A B long count = 0; count 0 count = s * A count s * A s A if(t >= A){
            count += A;
        }else{
            count += t;
        } t >= A t A {
            count += A;
        } count += A count A {
            count += t;
        } count += t count t System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main{
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        long n = scanner.nextLong();
        long A = scanner.nextLong();
        long B = scanner.nextLong();
 
        long s = n / (A + B);
        long t = n % (A + B);
        long count = 0;
 
        count = s * A;
        if(t >= A){
            count += A;
        }else{
            count += t;
        }
        System.out.println(count);
        
	}
} public class Main{
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        long n = scanner.nextLong();
        long A = scanner.nextLong();
        long B = scanner.nextLong();
 
        long s = n / (A + B);
        long t = n % (A + B);
        long count = 0;
 
        count = s * A;
        if(t >= A){
            count += A;
        }else{
            count += t;
        }
        System.out.println(count);
        
	}
} Main
import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        long n = scanner.nextLong();
        long A = scanner.nextLong();
        long B = scanner.nextLong();
 
        long s = n / (A + B);
        long t = n % (A + B);
        long count = 0;
 
        count = s * A;
        if(t >= A){
            count += A;
        }else{
            count += t;
        }
        System.out.println(count);
        
	}
}
