import java.util.*;
public class Main {
	
	public static void main(String[] args){
		
		Scanner sc = new Scanner(System.in);
		
		String StrN = sc.next();
		String StrA = sc.next();
		String StrB = sc.next();
		long n = Long.parseLong(StrN);
		long a = Long.parseLong(StrA);
		long b = Long.parseLong(StrB);

		long block = n / (a+b);
		long surplus = n%(a+b);
		
		long result = (block * a) + (surplus<a?surplus:a);
		System.out.println(result);
	}
} import java.util.*; util.* java public class Main {
	
	public static void main(String[] args){
		
		Scanner sc = new Scanner(System.in);
		
		String StrN = sc.next();
		String StrA = sc.next();
		String StrB = sc.next();
		long n = Long.parseLong(StrN);
		long a = Long.parseLong(StrA);
		long b = Long.parseLong(StrB);

		long block = n / (a+b);
		long surplus = n%(a+b);
		
		long result = (block * a) + (surplus<a?surplus:a);
		System.out.println(result);
	}
} Main public static void main(String[] args){
		
		Scanner sc = new Scanner(System.in);
		
		String StrN = sc.next();
		String StrA = sc.next();
		String StrB = sc.next();
		long n = Long.parseLong(StrN);
		long a = Long.parseLong(StrA);
		long b = Long.parseLong(StrB);

		long block = n / (a+b);
		long surplus = n%(a+b);
		
		long result = (block * a) + (surplus<a?surplus:a);
		System.out.println(result);
	} main {
		
		Scanner sc = new Scanner(System.in);
		
		String StrN = sc.next();
		String StrA = sc.next();
		String StrB = sc.next();
		long n = Long.parseLong(StrN);
		long a = Long.parseLong(StrA);
		long b = Long.parseLong(StrB);

		long block = n / (a+b);
		long surplus = n%(a+b);
		
		long result = (block * a) + (surplus<a?surplus:a);
		System.out.println(result);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String StrN = sc.next(); StrN sc.next() sc.next sc String StrA = sc.next(); StrA sc.next() sc.next sc String StrB = sc.next(); StrB sc.next() sc.next sc long n = Long.parseLong(StrN); n Long.parseLong(StrN) Long.parseLong Long StrN long a = Long.parseLong(StrA); a Long.parseLong(StrA) Long.parseLong Long StrA long b = Long.parseLong(StrB); b Long.parseLong(StrB) Long.parseLong Long StrB long block = n / (a+b); block n / (a+b) n (a+b) a b long surplus = n%(a+b); surplus n%(a+b) n (a+b) a b long result = (block * a) + (surplus<a?surplus:a); result (block * a) + (surplus<a?surplus:a) (block * a) block a (surplus<a?surplus:a) surplus<a surplus a surplus 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){
		
		Scanner sc = new Scanner(System.in);
		
		String StrN = sc.next();
		String StrA = sc.next();
		String StrB = sc.next();
		long n = Long.parseLong(StrN);
		long a = Long.parseLong(StrA);
		long b = Long.parseLong(StrB);

		long block = n / (a+b);
		long surplus = n%(a+b);
		
		long result = (block * a) + (surplus<a?surplus:a);
		System.out.println(result);
	}
} public class Main {
	
	public static void main(String[] args){
		
		Scanner sc = new Scanner(System.in);
		
		String StrN = sc.next();
		String StrA = sc.next();
		String StrB = sc.next();
		long n = Long.parseLong(StrN);
		long a = Long.parseLong(StrA);
		long b = Long.parseLong(StrB);

		long block = n / (a+b);
		long surplus = n%(a+b);
		
		long result = (block * a) + (surplus<a?surplus:a);
		System.out.println(result);
	}
} Main
import java.util.*;
public class Main {
	
	public static void main(String[] args){
		
		Scanner sc = new Scanner(System.in);
		
		String StrN = sc.next();
		String StrA = sc.next();
		String StrB = sc.next();
		long n = Long.parseLong(StrN);
		long a = Long.parseLong(StrA);
		long b = Long.parseLong(StrB);

		long block = n / (a+b);
		long surplus = n%(a+b);
		
		long result = (block * a) + (surplus<a?surplus:a);
		System.out.println(result);
	}
}