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 answer = 0;
		long quot = 0;
		long mod = 0;

		quot = n / (a + b);
		mod = n % (a + b);

		if (a <= mod) {
			answer = quot * a + a;
		} else {
			answer = quot * a +  mod;
		}

		System.out.println(answer);
	}
} 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 answer = 0;
		long quot = 0;
		long mod = 0;

		quot = n / (a + b);
		mod = n % (a + b);

		if (a <= mod) {
			answer = quot * a + a;
		} else {
			answer = quot * a +  mod;
		}

		System.out.println(answer);
	}
} 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 answer = 0;
		long quot = 0;
		long mod = 0;

		quot = n / (a + b);
		mod = n % (a + b);

		if (a <= mod) {
			answer = quot * a + a;
		} else {
			answer = quot * a +  mod;
		}

		System.out.println(answer);
	} main {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		long a = sc.nextLong();
		long b = sc.nextLong();

		long answer = 0;
		long quot = 0;
		long mod = 0;

		quot = n / (a + b);
		mod = n % (a + b);

		if (a <= mod) {
			answer = quot * a + a;
		} else {
			answer = quot * a +  mod;
		}

		System.out.println(answer);
	} 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 answer = 0; answer 0 long quot = 0; quot 0 long mod = 0; mod 0 quot = n / (a + b) quot n / (a + b) n (a + b) a b mod = n % (a + b) mod n % (a + b) n (a + b) a b if (a <= mod) {
			answer = quot * a + a;
		} else {
			answer = quot * a +  mod;
		} a <= mod a mod {
			answer = quot * a + a;
		} answer = quot * a + a answer quot * a + a quot * a quot a a {
			answer = quot * a +  mod;
		} answer = quot * a +  mod answer quot * a +  mod quot * a quot a mod System.out.println(answer) System.out.println System.out System System.out answer 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 answer = 0;
		long quot = 0;
		long mod = 0;

		quot = n / (a + b);
		mod = n % (a + b);

		if (a <= mod) {
			answer = quot * a + a;
		} else {
			answer = quot * a +  mod;
		}

		System.out.println(answer);
	}
} 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 answer = 0;
		long quot = 0;
		long mod = 0;

		quot = n / (a + b);
		mod = n % (a + b);

		if (a <= mod) {
			answer = quot * a + a;
		} else {
			answer = quot * a +  mod;
		}

		System.out.println(answer);
	}
} 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 answer = 0;
		long quot = 0;
		long mod = 0;

		quot = n / (a + b);
		mod = n % (a + b);

		if (a <= mod) {
			answer = quot * a + a;
		} else {
			answer = quot * a +  mod;
		}

		System.out.println(answer);
	}
}