import java.util.*;
class Main {
	public static void main(String[] args) throws Exception {
		final Scanner sc = new Scanner(System.in);

        final long N = sc.nextLong();
        final long A = sc.nextLong();
        final long B = sc.nextLong();
        long AB = A + B;
        long num = N / AB;
        long amari = N % AB;

        long sum = num * A;
        if(amari >= A)
            sum += A;
        else    
            sum += amari;
        System.out.println(sum);
    }

} import java.util.*; util.* java class Main {
	public static void main(String[] args) throws Exception {
		final Scanner sc = new Scanner(System.in);

        final long N = sc.nextLong();
        final long A = sc.nextLong();
        final long B = sc.nextLong();
        long AB = A + B;
        long num = N / AB;
        long amari = N % AB;

        long sum = num * A;
        if(amari >= A)
            sum += A;
        else    
            sum += amari;
        System.out.println(sum);
    }

} Main public static void main(String[] args) throws Exception {
		final Scanner sc = new Scanner(System.in);

        final long N = sc.nextLong();
        final long A = sc.nextLong();
        final long B = sc.nextLong();
        long AB = A + B;
        long num = N / AB;
        long amari = N % AB;

        long sum = num * A;
        if(amari >= A)
            sum += A;
        else    
            sum += amari;
        System.out.println(sum);
    } main {
		final Scanner sc = new Scanner(System.in);

        final long N = sc.nextLong();
        final long A = sc.nextLong();
        final long B = sc.nextLong();
        long AB = A + B;
        long num = N / AB;
        long amari = N % AB;

        long sum = num * A;
        if(amari >= A)
            sum += A;
        else    
            sum += amari;
        System.out.println(sum);
    } final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc final long A = sc.nextLong(); A sc.nextLong() sc.nextLong sc final long B = sc.nextLong(); B sc.nextLong() sc.nextLong sc long AB = A + B; AB A + B A B long num = N / AB; num N / AB N AB long amari = N % AB; amari N % AB N AB long sum = num * A; sum num * A num A if(amari >= A)
            sum += A;
        else    
            sum += amari; amari >= A amari A sum += A sum A sum += amari sum amari System.out.println(sum) System.out.println System.out System System.out sum String[] args args
import java.util.*;
class Main {
	public static void main(String[] args) throws Exception {
		final Scanner sc = new Scanner(System.in);

        final long N = sc.nextLong();
        final long A = sc.nextLong();
        final long B = sc.nextLong();
        long AB = A + B;
        long num = N / AB;
        long amari = N % AB;

        long sum = num * A;
        if(amari >= A)
            sum += A;
        else    
            sum += amari;
        System.out.println(sum);
    }

}
