//package javaapplication2;
import java.util.*;
import java.io.*;
import static java.lang.System.out;

public class Main {
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] s = br.readLine().split("\\s");
        long N = Long.parseLong(s[0]);
        long A = Long.parseLong(s[1]);
        long B = Long.parseLong(s[2]);
        System.out.println(solve(N,A,B));  
    }
    
    private static long solve(long N,long blue,long red){
        if(blue == 0) return 0;
        long div = N / (blue + red);
        long rem = N - (blue + red) *  div;
        return blue * div + (rem >= blue ? blue : rem);
    }
} import java.util.*; util.* java import java.io.*; io.* java import static java.lang.System.out; import static java.lang.System.out; import static java.lang.System.out; public class Main {
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] s = br.readLine().split("\\s");
        long N = Long.parseLong(s[0]);
        long A = Long.parseLong(s[1]);
        long B = Long.parseLong(s[2]);
        System.out.println(solve(N,A,B));  
    }
    
    private static long solve(long N,long blue,long red){
        if(blue == 0) return 0;
        long div = N / (blue + red);
        long rem = N - (blue + red) *  div;
        return blue * div + (rem >= blue ? blue : rem);
    }
} Main public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] s = br.readLine().split("\\s");
        long N = Long.parseLong(s[0]);
        long A = Long.parseLong(s[1]);
        long B = Long.parseLong(s[2]);
        System.out.println(solve(N,A,B));  
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] s = br.readLine().split("\\s");
        long N = Long.parseLong(s[0]);
        long A = Long.parseLong(s[1]);
        long B = Long.parseLong(s[2]);
        System.out.println(solve(N,A,B));  
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] s = br.readLine().split("\\s"); s br.readLine().split("\\s") br.readLine().split br.readLine() br.readLine br "\\s" long N = Long.parseLong(s[0]); N Long.parseLong(s[0]) Long.parseLong Long s[0] s 0 long A = Long.parseLong(s[1]); A Long.parseLong(s[1]) Long.parseLong Long s[1] s 1 long B = Long.parseLong(s[2]); B Long.parseLong(s[2]) Long.parseLong Long s[2] s 2 System.out.println(solve(N,A,B)) System.out.println System.out System System.out solve(N,A,B) solve N A B String[] args args private static long solve(long N,long blue,long red){
        if(blue == 0) return 0;
        long div = N / (blue + red);
        long rem = N - (blue + red) *  div;
        return blue * div + (rem >= blue ? blue : rem);
    } solve {
        if(blue == 0) return 0;
        long div = N / (blue + red);
        long rem = N - (blue + red) *  div;
        return blue * div + (rem >= blue ? blue : rem);
    } if(blue == 0) return 0; blue == 0 blue 0 return 0; 0 long div = N / (blue + red); div N / (blue + red) N (blue + red) blue red long rem = N - (blue + red) *  div; rem N - (blue + red) *  div N (blue + red) *  div (blue + red) blue red div return blue * div + (rem >= blue ? blue : rem); blue * div + (rem >= blue ? blue : rem) blue * div blue div (rem >= blue ? blue : rem) rem >= blue rem blue blue rem long N N long blue blue long red red public class Main {
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] s = br.readLine().split("\\s");
        long N = Long.parseLong(s[0]);
        long A = Long.parseLong(s[1]);
        long B = Long.parseLong(s[2]);
        System.out.println(solve(N,A,B));  
    }
    
    private static long solve(long N,long blue,long red){
        if(blue == 0) return 0;
        long div = N / (blue + red);
        long rem = N - (blue + red) *  div;
        return blue * div + (rem >= blue ? blue : rem);
    }
} public class Main {
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] s = br.readLine().split("\\s");
        long N = Long.parseLong(s[0]);
        long A = Long.parseLong(s[1]);
        long B = Long.parseLong(s[2]);
        System.out.println(solve(N,A,B));  
    }
    
    private static long solve(long N,long blue,long red){
        if(blue == 0) return 0;
        long div = N / (blue + red);
        long rem = N - (blue + red) *  div;
        return blue * div + (rem >= blue ? blue : rem);
    }
} Main
//package javaapplication2;
import java.util.*;
import java.io.*;
import static java.lang.System.out;

public class Main {
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] s = br.readLine().split("\\s");
        long N = Long.parseLong(s[0]);
        long A = Long.parseLong(s[1]);
        long B = Long.parseLong(s[2]);
        System.out.println(solve(N,A,B));  
    }
    
    private static long solve(long N,long blue,long red){
        if(blue == 0) return 0;
        long div = N / (blue + red);
        long rem = N - (blue + red) *  div;
        return blue * div + (rem >= blue ? blue : rem);
    }
}
