import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		long a = sc.nextLong();
		long b = sc.nextLong();

		long r = n / (a + b);
		long k = 0;
		long ans = 0;
		ans = r * a;
		k = r * (a + b);

		if (k + a < n) {
			ans += a;
		}else {
			ans += n - k;
		}

		System.out.println(ans);
	}

} 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 a = sc.nextLong();
		long b = sc.nextLong();

		long r = n / (a + b);
		long k = 0;
		long ans = 0;
		ans = r * a;
		k = r * (a + b);

		if (k + a < n) {
			ans += a;
		}else {
			ans += n - k;
		}

		System.out.println(ans);
	}

} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		long a = sc.nextLong();
		long b = sc.nextLong();

		long r = n / (a + b);
		long k = 0;
		long ans = 0;
		ans = r * a;
		k = r * (a + b);

		if (k + a < n) {
			ans += a;
		}else {
			ans += n - k;
		}

		System.out.println(ans);
	} main {

		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		long a = sc.nextLong();
		long b = sc.nextLong();

		long r = n / (a + b);
		long k = 0;
		long ans = 0;
		ans = r * a;
		k = r * (a + b);

		if (k + a < n) {
			ans += a;
		}else {
			ans += n - k;
		}

		System.out.println(ans);
	} 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 r = n / (a + b); r n / (a + b) n (a + b) a b long k = 0; k 0 long ans = 0; ans 0 ans = r * a ans r * a r a k = r * (a + b) k r * (a + b) r (a + b) a b if (k + a < n) {
			ans += a;
		}else {
			ans += n - k;
		} k + a < n k + a k a n {
			ans += a;
		} ans += a ans a {
			ans += n - k;
		} ans += n - k ans n - k n k System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		long a = sc.nextLong();
		long b = sc.nextLong();

		long r = n / (a + b);
		long k = 0;
		long ans = 0;
		ans = r * a;
		k = r * (a + b);

		if (k + a < n) {
			ans += a;
		}else {
			ans += n - k;
		}

		System.out.println(ans);
	}

} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		long a = sc.nextLong();
		long b = sc.nextLong();

		long r = n / (a + b);
		long k = 0;
		long ans = 0;
		ans = r * a;
		k = r * (a + b);

		if (k + a < n) {
			ans += a;
		}else {
			ans += n - k;
		}

		System.out.println(ans);
	}

} 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 a = sc.nextLong();
		long b = sc.nextLong();

		long r = n / (a + b);
		long k = 0;
		long ans = 0;
		ans = r * a;
		k = r * (a + b);

		if (k + a < n) {
			ans += a;
		}else {
			ans += n - k;
		}

		System.out.println(ans);
	}

}
