import java.util.Scanner;


public class Main {


//	final int MOD = 1000000007;

	public static long ans = 0;

	public static void main(String[] args) {

//		int ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

		long n = sc.nextLong();
		long a = sc.nextLong();
		long b = sc.nextLong();

//		int n = sc.nextInt();


		//-------------------------------------------------------------------------------------

		ans = n / (a + b);
		ans *= a;

		if(n % (a + b) > 0) {
			if(n % (a + b) > a) {
				ans += a;
			} else
				ans += n % (a + b);
		}

		//-------------------------------------------------------------------------------------

//		if(f) {
//			System.out.println("Yes");
//		} else {
//			System.out.println("No");
//		}

		System.out.println(ans);

		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {


//	final int MOD = 1000000007;

	public static long ans = 0;

	public static void main(String[] args) {

//		int ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

		long n = sc.nextLong();
		long a = sc.nextLong();
		long b = sc.nextLong();

//		int n = sc.nextInt();


		//-------------------------------------------------------------------------------------

		ans = n / (a + b);
		ans *= a;

		if(n % (a + b) > 0) {
			if(n % (a + b) > a) {
				ans += a;
			} else
				ans += n % (a + b);
		}

		//-------------------------------------------------------------------------------------

//		if(f) {
//			System.out.println("Yes");
//		} else {
//			System.out.println("No");
//		}

		System.out.println(ans);

		sc.close();
	}
} Main public static long ans = 0; ans 0 public static void main(String[] args) {

//		int ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

		long n = sc.nextLong();
		long a = sc.nextLong();
		long b = sc.nextLong();

//		int n = sc.nextInt();


		//-------------------------------------------------------------------------------------

		ans = n / (a + b);
		ans *= a;

		if(n % (a + b) > 0) {
			if(n % (a + b) > a) {
				ans += a;
			} else
				ans += n % (a + b);
		}

		//-------------------------------------------------------------------------------------

//		if(f) {
//			System.out.println("Yes");
//		} else {
//			System.out.println("No");
//		}

		System.out.println(ans);

		sc.close();
	} main {

//		int ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

		long n = sc.nextLong();
		long a = sc.nextLong();
		long b = sc.nextLong();

//		int n = sc.nextInt();


		//-------------------------------------------------------------------------------------

		ans = n / (a + b);
		ans *= a;

		if(n % (a + b) > 0) {
			if(n % (a + b) > a) {
				ans += a;
			} else
				ans += n % (a + b);
		}

		//-------------------------------------------------------------------------------------

//		if(f) {
//			System.out.println("Yes");
//		} else {
//			System.out.println("No");
//		}

		System.out.println(ans);

		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) boolean f = false; f false 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 ans = n / (a + b) ans n / (a + b) n (a + b) a b ans *= a ans a if(n % (a + b) > 0) {
			if(n % (a + b) > a) {
				ans += a;
			} else
				ans += n % (a + b);
		} n % (a + b) > 0 n % (a + b) n (a + b) a b 0 {
			if(n % (a + b) > a) {
				ans += a;
			} else
				ans += n % (a + b);
		} if(n % (a + b) > a) {
				ans += a;
			} else
				ans += n % (a + b); n % (a + b) > a n % (a + b) n (a + b) a b a {
				ans += a;
			} ans += a ans a ans += n % (a + b) ans n % (a + b) n (a + b) a b System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc String[] args args public class Main {


//	final int MOD = 1000000007;

	public static long ans = 0;

	public static void main(String[] args) {

//		int ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

		long n = sc.nextLong();
		long a = sc.nextLong();
		long b = sc.nextLong();

//		int n = sc.nextInt();


		//-------------------------------------------------------------------------------------

		ans = n / (a + b);
		ans *= a;

		if(n % (a + b) > 0) {
			if(n % (a + b) > a) {
				ans += a;
			} else
				ans += n % (a + b);
		}

		//-------------------------------------------------------------------------------------

//		if(f) {
//			System.out.println("Yes");
//		} else {
//			System.out.println("No");
//		}

		System.out.println(ans);

		sc.close();
	}
} public class Main {


//	final int MOD = 1000000007;

	public static long ans = 0;

	public static void main(String[] args) {

//		int ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

		long n = sc.nextLong();
		long a = sc.nextLong();
		long b = sc.nextLong();

//		int n = sc.nextInt();


		//-------------------------------------------------------------------------------------

		ans = n / (a + b);
		ans *= a;

		if(n % (a + b) > 0) {
			if(n % (a + b) > a) {
				ans += a;
			} else
				ans += n % (a + b);
		}

		//-------------------------------------------------------------------------------------

//		if(f) {
//			System.out.println("Yes");
//		} else {
//			System.out.println("No");
//		}

		System.out.println(ans);

		sc.close();
	}
} Main
import java.util.Scanner;


public class Main {


//	final int MOD = 1000000007;

	public static long ans = 0;

	public static void main(String[] args) {

//		int ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

		long n = sc.nextLong();
		long a = sc.nextLong();
		long b = sc.nextLong();

//		int n = sc.nextInt();


		//-------------------------------------------------------------------------------------

		ans = n / (a + b);
		ans *= a;

		if(n % (a + b) > 0) {
			if(n % (a + b) > a) {
				ans += a;
			} else
				ans += n % (a + b);
		}

		//-------------------------------------------------------------------------------------

//		if(f) {
//			System.out.println("Yes");
//		} else {
//			System.out.println("No");
//		}

		System.out.println(ans);

		sc.close();
	}
}