import java.io.BufferedReader;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;
public class Main {
	public static void main(final String[] args){
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long a = sc.nextLong();
        long b = sc.nextLong();

        long hoge1 = n / (a + b);
        long hoge2 = n % (a + b);
        long count = 0;

        count = hoge1 * a;
        if(hoge2 >= a){
            count += a;
        }else{
            count += hoge2;
        }
        System.out.println(count);
        
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.*; io.* java import java.util.*; util.* java import java.util.ArrayList; ArrayList java.util import java.util.Iterator; Iterator java.util import java.util.List; List java.util import java.util.Collections; Collections java.util public class Main {
	public static void main(final String[] args){
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long a = sc.nextLong();
        long b = sc.nextLong();

        long hoge1 = n / (a + b);
        long hoge2 = n % (a + b);
        long count = 0;

        count = hoge1 * a;
        if(hoge2 >= a){
            count += a;
        }else{
            count += hoge2;
        }
        System.out.println(count);
        
	}
} Main public static void main(final String[] args){
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long a = sc.nextLong();
        long b = sc.nextLong();

        long hoge1 = n / (a + b);
        long hoge2 = n % (a + b);
        long count = 0;

        count = hoge1 * a;
        if(hoge2 >= a){
            count += a;
        }else{
            count += hoge2;
        }
        System.out.println(count);
        
	} main {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long a = sc.nextLong();
        long b = sc.nextLong();

        long hoge1 = n / (a + b);
        long hoge2 = n % (a + b);
        long count = 0;

        count = hoge1 * a;
        if(hoge2 >= a){
            count += a;
        }else{
            count += hoge2;
        }
        System.out.println(count);
        
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc long a = sc.nextLong(); a sc.nextLong() sc.nextLong sc long b = sc.nextLong(); b sc.nextLong() sc.nextLong sc long hoge1 = n / (a + b); hoge1 n / (a + b) n (a + b) a b long hoge2 = n % (a + b); hoge2 n % (a + b) n (a + b) a b long count = 0; count 0 count = hoge1 * a count hoge1 * a hoge1 a if(hoge2 >= a){
            count += a;
        }else{
            count += hoge2;
        } hoge2 >= a hoge2 a {
            count += a;
        } count += a count a {
            count += hoge2;
        } count += hoge2 count hoge2 System.out.println(count) System.out.println System.out System System.out count final String[] args args public class Main {
	public static void main(final String[] args){
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long a = sc.nextLong();
        long b = sc.nextLong();

        long hoge1 = n / (a + b);
        long hoge2 = n % (a + b);
        long count = 0;

        count = hoge1 * a;
        if(hoge2 >= a){
            count += a;
        }else{
            count += hoge2;
        }
        System.out.println(count);
        
	}
} public class Main {
	public static void main(final String[] args){
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long a = sc.nextLong();
        long b = sc.nextLong();

        long hoge1 = n / (a + b);
        long hoge2 = n % (a + b);
        long count = 0;

        count = hoge1 * a;
        if(hoge2 >= a){
            count += a;
        }else{
            count += hoge2;
        }
        System.out.println(count);
        
	}
} Main
import java.io.BufferedReader;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;
public class Main {
	public static void main(final String[] args){
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long a = sc.nextLong();
        long b = sc.nextLong();

        long hoge1 = n / (a + b);
        long hoge2 = n % (a + b);
        long count = 0;

        count = hoge1 * a;
        if(hoge2 >= a){
            count += a;
        }else{
            count += hoge2;
        }
        System.out.println(count);
        
	}
}