
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 all = a + b;
		long wari = n / all;
		wari = wari * a;
		long amari = n % all;
		long hasuu = a > amari ? amari : a;
		System.out.println(wari + hasuu);

		sc.close();
	}

} 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 all = a + b;
		long wari = n / all;
		wari = wari * a;
		long amari = n % all;
		long hasuu = a > amari ? amari : a;
		System.out.println(wari + hasuu);

		sc.close();
	}

} 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 all = a + b;
		long wari = n / all;
		wari = wari * a;
		long amari = n % all;
		long hasuu = a > amari ? amari : a;
		System.out.println(wari + hasuu);

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		long a = sc.nextLong();
		long b = sc.nextLong();
		long all = a + b;
		long wari = n / all;
		wari = wari * a;
		long amari = n % all;
		long hasuu = a > amari ? amari : a;
		System.out.println(wari + hasuu);

		sc.close();
	} 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 all = a + b; all a + b a b long wari = n / all; wari n / all n all wari = wari * a wari wari * a wari a long amari = n % all; amari n % all n all long hasuu = a > amari ? amari : a; hasuu a > amari ? amari : a a > amari a amari amari a System.out.println(wari + hasuu) System.out.println System.out System System.out wari + hasuu wari hasuu sc.close() sc.close sc 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 all = a + b;
		long wari = n / all;
		wari = wari * a;
		long amari = n % all;
		long hasuu = a > amari ? amari : a;
		System.out.println(wari + hasuu);

		sc.close();
	}

} 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 all = a + b;
		long wari = n / all;
		wari = wari * a;
		long amari = n % all;
		long hasuu = a > amari ? amari : a;
		System.out.println(wari + hasuu);

		sc.close();
	}

} 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 all = a + b;
		long wari = n / all;
		wari = wari * a;
		long amari = n % all;
		long hasuu = a > amari ? amari : a;
		System.out.println(wari + hasuu);

		sc.close();
	}

}
