import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		
		long n = sc.nextLong();
		long b = sc.nextLong();
		long r = sc.nextLong();
		
		if(b == 0) {
			System.out.println(0);
			return;
		}
		
		long total = b+r;
		
		long num = n/total;
		
		long amari = n%total;
		
		long ans = num*b;
		
	
		if(amari >= b) {
			ans+=b;
		} else {
			ans+=amari;
		}
		
		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 b = sc.nextLong();
		long r = sc.nextLong();
		
		if(b == 0) {
			System.out.println(0);
			return;
		}
		
		long total = b+r;
		
		long num = n/total;
		
		long amari = n%total;
		
		long ans = num*b;
		
	
		if(amari >= b) {
			ans+=b;
		} else {
			ans+=amari;
		}
		
		System.out.println(ans);

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

		Scanner sc = new Scanner(System.in);
		
		long n = sc.nextLong();
		long b = sc.nextLong();
		long r = sc.nextLong();
		
		if(b == 0) {
			System.out.println(0);
			return;
		}
		
		long total = b+r;
		
		long num = n/total;
		
		long amari = n%total;
		
		long ans = num*b;
		
	
		if(amari >= b) {
			ans+=b;
		} else {
			ans+=amari;
		}
		
		System.out.println(ans);

	} main {

		Scanner sc = new Scanner(System.in);
		
		long n = sc.nextLong();
		long b = sc.nextLong();
		long r = sc.nextLong();
		
		if(b == 0) {
			System.out.println(0);
			return;
		}
		
		long total = b+r;
		
		long num = n/total;
		
		long amari = n%total;
		
		long ans = num*b;
		
	
		if(amari >= b) {
			ans+=b;
		} else {
			ans+=amari;
		}
		
		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 b = sc.nextLong(); b sc.nextLong() sc.nextLong sc long r = sc.nextLong(); r sc.nextLong() sc.nextLong sc if(b == 0) {
			System.out.println(0);
			return;
		} b == 0 b 0 {
			System.out.println(0);
			return;
		} System.out.println(0) System.out.println System.out System System.out 0 return; long total = b+r; total b+r b r long num = n/total; num n/total n total long amari = n%total; amari n%total n total long ans = num*b; ans num*b num b if(amari >= b) {
			ans+=b;
		} else {
			ans+=amari;
		} amari >= b amari b {
			ans+=b;
		} ans+=b ans b {
			ans+=amari;
		} ans+=amari ans amari 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 b = sc.nextLong();
		long r = sc.nextLong();
		
		if(b == 0) {
			System.out.println(0);
			return;
		}
		
		long total = b+r;
		
		long num = n/total;
		
		long amari = n%total;
		
		long ans = num*b;
		
	
		if(amari >= b) {
			ans+=b;
		} else {
			ans+=amari;
		}
		
		System.out.println(ans);

	}
} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		
		long n = sc.nextLong();
		long b = sc.nextLong();
		long r = sc.nextLong();
		
		if(b == 0) {
			System.out.println(0);
			return;
		}
		
		long total = b+r;
		
		long num = n/total;
		
		long amari = n%total;
		
		long ans = num*b;
		
	
		if(amari >= b) {
			ans+=b;
		} else {
			ans+=amari;
		}
		
		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 b = sc.nextLong();
		long r = sc.nextLong();
		
		if(b == 0) {
			System.out.println(0);
			return;
		}
		
		long total = b+r;
		
		long num = n/total;
		
		long amari = n%total;
		
		long ans = num*b;
		
	
		if(amari >= b) {
			ans+=b;
		} else {
			ans+=amari;
		}
		
		System.out.println(ans);

	}
}
