public class Main
{
	public static void main(String[] args) {
        int N = Integer.parseInt(args[0]);
        int A = Integer.parseInt(args[1]);
        int B = Integer.parseInt(args[2]);
        int rep = A * (N/(A+B)) + N%(A+B);
        System.out.println(rep);
	}
}
