import java.util.Scanner;

public class Main{

    public static void main(String[] args){
        // 変数宣言
        long total = 0;
        long blue = 0;
        long result = 0;
        long n;
        long a;
        long b;

        // 入力
        Scanner sc = new Scanner(System.in);
        
        n = Long.parseLong(sc.next());
        a = Long.parseLong(sc.next());
        b = Long.parseLong(sc.next());

        sc.close();

        // 演算処理
        long i = n / ( a + b );
        long j = n % ( a + b ); 
        result = a*i;

        if( j < a ){
            result = result + j;
        }else{
            result = result + a;
        }

        // resultを出力
        System.out.println( result );

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

    public static void main(String[] args){
        // 変数宣言
        long total = 0;
        long blue = 0;
        long result = 0;
        long n;
        long a;
        long b;

        // 入力
        Scanner sc = new Scanner(System.in);
        
        n = Long.parseLong(sc.next());
        a = Long.parseLong(sc.next());
        b = Long.parseLong(sc.next());

        sc.close();

        // 演算処理
        long i = n / ( a + b );
        long j = n % ( a + b ); 
        result = a*i;

        if( j < a ){
            result = result + j;
        }else{
            result = result + a;
        }

        // resultを出力
        System.out.println( result );

    }
} Main public static void main(String[] args){
        // 変数宣言
        long total = 0;
        long blue = 0;
        long result = 0;
        long n;
        long a;
        long b;

        // 入力
        Scanner sc = new Scanner(System.in);
        
        n = Long.parseLong(sc.next());
        a = Long.parseLong(sc.next());
        b = Long.parseLong(sc.next());

        sc.close();

        // 演算処理
        long i = n / ( a + b );
        long j = n % ( a + b ); 
        result = a*i;

        if( j < a ){
            result = result + j;
        }else{
            result = result + a;
        }

        // resultを出力
        System.out.println( result );

    } main {
        // 変数宣言
        long total = 0;
        long blue = 0;
        long result = 0;
        long n;
        long a;
        long b;

        // 入力
        Scanner sc = new Scanner(System.in);
        
        n = Long.parseLong(sc.next());
        a = Long.parseLong(sc.next());
        b = Long.parseLong(sc.next());

        sc.close();

        // 演算処理
        long i = n / ( a + b );
        long j = n % ( a + b ); 
        result = a*i;

        if( j < a ){
            result = result + j;
        }else{
            result = result + a;
        }

        // resultを出力
        System.out.println( result );

    } long total = 0; total 0 long blue = 0; blue 0 long result = 0; result 0 long n; n long a; a long b; b Scanner sc = new Scanner(System.in); sc new Scanner(System.in) n = Long.parseLong(sc.next()) n Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc a = Long.parseLong(sc.next()) a Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc b = Long.parseLong(sc.next()) b Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc sc.close() sc.close sc long i = n / ( a + b ); i n / ( a + b ) n ( a + b ) a b long j = n % ( a + b ); j n % ( a + b ) n ( a + b ) a b result = a*i result a*i a i if( j < a ){
            result = result + j;
        }else{
            result = result + a;
        } j < a j a {
            result = result + j;
        } result = result + j result result + j result j {
            result = result + a;
        } result = result + a result result + a result a System.out.println( result ) System.out.println System.out System System.out result String[] args args public class Main{

    public static void main(String[] args){
        // 変数宣言
        long total = 0;
        long blue = 0;
        long result = 0;
        long n;
        long a;
        long b;

        // 入力
        Scanner sc = new Scanner(System.in);
        
        n = Long.parseLong(sc.next());
        a = Long.parseLong(sc.next());
        b = Long.parseLong(sc.next());

        sc.close();

        // 演算処理
        long i = n / ( a + b );
        long j = n % ( a + b ); 
        result = a*i;

        if( j < a ){
            result = result + j;
        }else{
            result = result + a;
        }

        // resultを出力
        System.out.println( result );

    }
} public class Main{

    public static void main(String[] args){
        // 変数宣言
        long total = 0;
        long blue = 0;
        long result = 0;
        long n;
        long a;
        long b;

        // 入力
        Scanner sc = new Scanner(System.in);
        
        n = Long.parseLong(sc.next());
        a = Long.parseLong(sc.next());
        b = Long.parseLong(sc.next());

        sc.close();

        // 演算処理
        long i = n / ( a + b );
        long j = n % ( a + b ); 
        result = a*i;

        if( j < a ){
            result = result + j;
        }else{
            result = result + a;
        }

        // resultを出力
        System.out.println( result );

    }
} Main
import java.util.Scanner;

public class Main{

    public static void main(String[] args){
        // 変数宣言
        long total = 0;
        long blue = 0;
        long result = 0;
        long n;
        long a;
        long b;

        // 入力
        Scanner sc = new Scanner(System.in);
        
        n = Long.parseLong(sc.next());
        a = Long.parseLong(sc.next());
        b = Long.parseLong(sc.next());

        sc.close();

        // 演算処理
        long i = n / ( a + b );
        long j = n % ( a + b ); 
        result = a*i;

        if( j < a ){
            result = result + j;
        }else{
            result = result + a;
        }

        // resultを出力
        System.out.println( result );

    }
}