import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		long n = sc.nextLong();
		long blue = sc.nextLong();
		long red = sc.nextLong();
		
		long s = n / (blue + red);
		long k = n - s * (blue + red);
		
		if(k >= blue) {
			System.out.println(blue * (s + 1));
		}else {
			System.out.println(blue * s + k);
		}
	}
	
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		long n = sc.nextLong();
		long blue = sc.nextLong();
		long red = sc.nextLong();
		
		long s = n / (blue + red);
		long k = n - s * (blue + red);
		
		if(k >= blue) {
			System.out.println(blue * (s + 1));
		}else {
			System.out.println(blue * s + k);
		}
	}
	
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		long n = sc.nextLong();
		long blue = sc.nextLong();
		long red = sc.nextLong();
		
		long s = n / (blue + red);
		long k = n - s * (blue + red);
		
		if(k >= blue) {
			System.out.println(blue * (s + 1));
		}else {
			System.out.println(blue * s + k);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		
		long n = sc.nextLong();
		long blue = sc.nextLong();
		long red = sc.nextLong();
		
		long s = n / (blue + red);
		long k = n - s * (blue + red);
		
		if(k >= blue) {
			System.out.println(blue * (s + 1));
		}else {
			System.out.println(blue * s + k);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc long blue = sc.nextLong(); blue sc.nextLong() sc.nextLong sc long red = sc.nextLong(); red sc.nextLong() sc.nextLong sc long s = n / (blue + red); s n / (blue + red) n (blue + red) blue red long k = n - s * (blue + red); k n - s * (blue + red) n s * (blue + red) s (blue + red) blue red if(k >= blue) {
			System.out.println(blue * (s + 1));
		}else {
			System.out.println(blue * s + k);
		} k >= blue k blue {
			System.out.println(blue * (s + 1));
		} System.out.println(blue * (s + 1)) System.out.println System.out System System.out blue * (s + 1) blue (s + 1) s 1 {
			System.out.println(blue * s + k);
		} System.out.println(blue * s + k) System.out.println System.out System System.out blue * s + k blue * s blue s k String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		long n = sc.nextLong();
		long blue = sc.nextLong();
		long red = sc.nextLong();
		
		long s = n / (blue + red);
		long k = n - s * (blue + red);
		
		if(k >= blue) {
			System.out.println(blue * (s + 1));
		}else {
			System.out.println(blue * s + k);
		}
	}
	
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		long n = sc.nextLong();
		long blue = sc.nextLong();
		long red = sc.nextLong();
		
		long s = n / (blue + red);
		long k = n - s * (blue + red);
		
		if(k >= blue) {
			System.out.println(blue * (s + 1));
		}else {
			System.out.println(blue * s + k);
		}
	}
	
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		long n = sc.nextLong();
		long blue = sc.nextLong();
		long red = sc.nextLong();
		
		long s = n / (blue + red);
		long k = n - s * (blue + red);
		
		if(k >= blue) {
			System.out.println(blue * (s + 1));
		}else {
			System.out.println(blue * s + k);
		}
	}
	
}
