import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner as = new Scanner(System.in);
		long n = Long.parseLong(as.next());
		long a = Long.parseLong(as.next());
		long b = Long.parseLong(as.next());
		if(n%(a+b)<=a){
			System.out.println(n/(a+b)*a+n%(a+b));
		}else{
			System.out.println(n/(a+b)*a+a);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner as = new Scanner(System.in);
		long n = Long.parseLong(as.next());
		long a = Long.parseLong(as.next());
		long b = Long.parseLong(as.next());
		if(n%(a+b)<=a){
			System.out.println(n/(a+b)*a+n%(a+b));
		}else{
			System.out.println(n/(a+b)*a+a);
		}
	}
} Main public static void main(String[] args){
		Scanner as = new Scanner(System.in);
		long n = Long.parseLong(as.next());
		long a = Long.parseLong(as.next());
		long b = Long.parseLong(as.next());
		if(n%(a+b)<=a){
			System.out.println(n/(a+b)*a+n%(a+b));
		}else{
			System.out.println(n/(a+b)*a+a);
		}
	} main {
		Scanner as = new Scanner(System.in);
		long n = Long.parseLong(as.next());
		long a = Long.parseLong(as.next());
		long b = Long.parseLong(as.next());
		if(n%(a+b)<=a){
			System.out.println(n/(a+b)*a+n%(a+b));
		}else{
			System.out.println(n/(a+b)*a+a);
		}
	} Scanner as = new Scanner(System.in); as new Scanner(System.in) long n = Long.parseLong(as.next()); n Long.parseLong(as.next()) Long.parseLong Long as.next() as.next as long a = Long.parseLong(as.next()); a Long.parseLong(as.next()) Long.parseLong Long as.next() as.next as long b = Long.parseLong(as.next()); b Long.parseLong(as.next()) Long.parseLong Long as.next() as.next as if(n%(a+b)<=a){
			System.out.println(n/(a+b)*a+n%(a+b));
		}else{
			System.out.println(n/(a+b)*a+a);
		} n%(a+b)<=a n%(a+b) n (a+b) a b a {
			System.out.println(n/(a+b)*a+n%(a+b));
		} System.out.println(n/(a+b)*a+n%(a+b)) System.out.println System.out System System.out n/(a+b)*a+n%(a+b) n/(a+b)*a n/(a+b) n (a+b) a b a n%(a+b) n (a+b) a b {
			System.out.println(n/(a+b)*a+a);
		} System.out.println(n/(a+b)*a+a) System.out.println System.out System System.out n/(a+b)*a+a n/(a+b)*a n/(a+b) n (a+b) a b a a String[] args args public class Main {
	public static void main(String[] args){
		Scanner as = new Scanner(System.in);
		long n = Long.parseLong(as.next());
		long a = Long.parseLong(as.next());
		long b = Long.parseLong(as.next());
		if(n%(a+b)<=a){
			System.out.println(n/(a+b)*a+n%(a+b));
		}else{
			System.out.println(n/(a+b)*a+a);
		}
	}
} public class Main {
	public static void main(String[] args){
		Scanner as = new Scanner(System.in);
		long n = Long.parseLong(as.next());
		long a = Long.parseLong(as.next());
		long b = Long.parseLong(as.next());
		if(n%(a+b)<=a){
			System.out.println(n/(a+b)*a+n%(a+b));
		}else{
			System.out.println(n/(a+b)*a+a);
		}
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner as = new Scanner(System.in);
		long n = Long.parseLong(as.next());
		long a = Long.parseLong(as.next());
		long b = Long.parseLong(as.next());
		if(n%(a+b)<=a){
			System.out.println(n/(a+b)*a+n%(a+b));
		}else{
			System.out.println(n/(a+b)*a+a);
		}
	}
}