import java.util.Scanner;

public class Main{

    public static void main(String[] args) {

        new Main().solve();
    }

    void solve(){

        long N, A, B;

        Scanner sc = new Scanner(System.in);
        N = sc.nextLong();
        A = sc.nextLong();
        B = sc.nextLong();
        sc.close();

        long numOfblue;

        numOfblue = N / (A + B);
        numOfblue = numOfblue * A;

        if(N % (A + B) >= A){
            numOfblue = numOfblue + A;
        }
        else{
            numOfblue = numOfblue + N % (A + B);
        }

        System.out.println(numOfblue);
    }

       
} import java.util.Scanner; Scanner java.util public class Main{

    public static void main(String[] args) {

        new Main().solve();
    }

    void solve(){

        long N, A, B;

        Scanner sc = new Scanner(System.in);
        N = sc.nextLong();
        A = sc.nextLong();
        B = sc.nextLong();
        sc.close();

        long numOfblue;

        numOfblue = N / (A + B);
        numOfblue = numOfblue * A;

        if(N % (A + B) >= A){
            numOfblue = numOfblue + A;
        }
        else{
            numOfblue = numOfblue + N % (A + B);
        }

        System.out.println(numOfblue);
    }

       
} Main public static void main(String[] args) {

        new Main().solve();
    } main {

        new Main().solve();
    } new Main().solve() new Main().solve new Main() String[] args args void solve(){

        long N, A, B;

        Scanner sc = new Scanner(System.in);
        N = sc.nextLong();
        A = sc.nextLong();
        B = sc.nextLong();
        sc.close();

        long numOfblue;

        numOfblue = N / (A + B);
        numOfblue = numOfblue * A;

        if(N % (A + B) >= A){
            numOfblue = numOfblue + A;
        }
        else{
            numOfblue = numOfblue + N % (A + B);
        }

        System.out.println(numOfblue);
    } solve {

        long N, A, B;

        Scanner sc = new Scanner(System.in);
        N = sc.nextLong();
        A = sc.nextLong();
        B = sc.nextLong();
        sc.close();

        long numOfblue;

        numOfblue = N / (A + B);
        numOfblue = numOfblue * A;

        if(N % (A + B) >= A){
            numOfblue = numOfblue + A;
        }
        else{
            numOfblue = numOfblue + N % (A + B);
        }

        System.out.println(numOfblue);
    } long N N A A B; B Scanner sc = new Scanner(System.in); sc new Scanner(System.in) N = sc.nextLong() N sc.nextLong() sc.nextLong sc A = sc.nextLong() A sc.nextLong() sc.nextLong sc B = sc.nextLong() B sc.nextLong() sc.nextLong sc sc.close() sc.close sc long numOfblue; numOfblue numOfblue = N / (A + B) numOfblue N / (A + B) N (A + B) A B numOfblue = numOfblue * A numOfblue numOfblue * A numOfblue A if(N % (A + B) >= A){
            numOfblue = numOfblue + A;
        }
        else{
            numOfblue = numOfblue + N % (A + B);
        } N % (A + B) >= A N % (A + B) N (A + B) A B A {
            numOfblue = numOfblue + A;
        } numOfblue = numOfblue + A numOfblue numOfblue + A numOfblue A {
            numOfblue = numOfblue + N % (A + B);
        } numOfblue = numOfblue + N % (A + B) numOfblue numOfblue + N % (A + B) numOfblue N % (A + B) N (A + B) A B System.out.println(numOfblue) System.out.println System.out System System.out numOfblue public class Main{

    public static void main(String[] args) {

        new Main().solve();
    }

    void solve(){

        long N, A, B;

        Scanner sc = new Scanner(System.in);
        N = sc.nextLong();
        A = sc.nextLong();
        B = sc.nextLong();
        sc.close();

        long numOfblue;

        numOfblue = N / (A + B);
        numOfblue = numOfblue * A;

        if(N % (A + B) >= A){
            numOfblue = numOfblue + A;
        }
        else{
            numOfblue = numOfblue + N % (A + B);
        }

        System.out.println(numOfblue);
    }

       
} public class Main{

    public static void main(String[] args) {

        new Main().solve();
    }

    void solve(){

        long N, A, B;

        Scanner sc = new Scanner(System.in);
        N = sc.nextLong();
        A = sc.nextLong();
        B = sc.nextLong();
        sc.close();

        long numOfblue;

        numOfblue = N / (A + B);
        numOfblue = numOfblue * A;

        if(N % (A + B) >= A){
            numOfblue = numOfblue + A;
        }
        else{
            numOfblue = numOfblue + N % (A + B);
        }

        System.out.println(numOfblue);
    }

       
} Main
import java.util.Scanner;

public class Main{

    public static void main(String[] args) {

        new Main().solve();
    }

    void solve(){

        long N, A, B;

        Scanner sc = new Scanner(System.in);
        N = sc.nextLong();
        A = sc.nextLong();
        B = sc.nextLong();
        sc.close();

        long numOfblue;

        numOfblue = N / (A + B);
        numOfblue = numOfblue * A;

        if(N % (A + B) >= A){
            numOfblue = numOfblue + A;
        }
        else{
            numOfblue = numOfblue + N % (A + B);
        }

        System.out.println(numOfblue);
    }

       
}