import java.util.Scanner;
public class Main{
 public static void main(String[] args) {
   Scanner kbd = new Scanner(System.in);
   long n=kbd.nextLong();
   long a=kbd.nextLong();
   long b=kbd.nextLong();

   if(a==0){
     System.out.println(a);
   }else if(b==0){
     System.out.println(n);
   }else{
   long k=a+b;
   long x;
   if(n%k>a){
     x=a;
   }else{
     x=n%k;
   }
   System.out.println(n/k*a+x);
 }
}
} import java.util.Scanner; Scanner java.util public class Main{
 public static void main(String[] args) {
   Scanner kbd = new Scanner(System.in);
   long n=kbd.nextLong();
   long a=kbd.nextLong();
   long b=kbd.nextLong();

   if(a==0){
     System.out.println(a);
   }else if(b==0){
     System.out.println(n);
   }else{
   long k=a+b;
   long x;
   if(n%k>a){
     x=a;
   }else{
     x=n%k;
   }
   System.out.println(n/k*a+x);
 }
}
} Main public static void main(String[] args) {
   Scanner kbd = new Scanner(System.in);
   long n=kbd.nextLong();
   long a=kbd.nextLong();
   long b=kbd.nextLong();

   if(a==0){
     System.out.println(a);
   }else if(b==0){
     System.out.println(n);
   }else{
   long k=a+b;
   long x;
   if(n%k>a){
     x=a;
   }else{
     x=n%k;
   }
   System.out.println(n/k*a+x);
 }
} main {
   Scanner kbd = new Scanner(System.in);
   long n=kbd.nextLong();
   long a=kbd.nextLong();
   long b=kbd.nextLong();

   if(a==0){
     System.out.println(a);
   }else if(b==0){
     System.out.println(n);
   }else{
   long k=a+b;
   long x;
   if(n%k>a){
     x=a;
   }else{
     x=n%k;
   }
   System.out.println(n/k*a+x);
 }
} Scanner kbd = new Scanner(System.in); kbd new Scanner(System.in) long n=kbd.nextLong(); n kbd.nextLong() kbd.nextLong kbd long a=kbd.nextLong(); a kbd.nextLong() kbd.nextLong kbd long b=kbd.nextLong(); b kbd.nextLong() kbd.nextLong kbd if(a==0){
     System.out.println(a);
   }else if(b==0){
     System.out.println(n);
   }else{
   long k=a+b;
   long x;
   if(n%k>a){
     x=a;
   }else{
     x=n%k;
   }
   System.out.println(n/k*a+x);
 } a==0 a 0 {
     System.out.println(a);
   } System.out.println(a) System.out.println System.out System System.out a if(b==0){
     System.out.println(n);
   }else{
   long k=a+b;
   long x;
   if(n%k>a){
     x=a;
   }else{
     x=n%k;
   }
   System.out.println(n/k*a+x);
 } b==0 b 0 {
     System.out.println(n);
   } System.out.println(n) System.out.println System.out System System.out n {
   long k=a+b;
   long x;
   if(n%k>a){
     x=a;
   }else{
     x=n%k;
   }
   System.out.println(n/k*a+x);
 } long k=a+b; k a+b a b long x; x if(n%k>a){
     x=a;
   }else{
     x=n%k;
   } n%k>a n%k n k a {
     x=a;
   } x=a x a {
     x=n%k;
   } x=n%k x n%k n k System.out.println(n/k*a+x) System.out.println System.out System System.out n/k*a+x n/k*a n/k n k a x String[] args args public class Main{
 public static void main(String[] args) {
   Scanner kbd = new Scanner(System.in);
   long n=kbd.nextLong();
   long a=kbd.nextLong();
   long b=kbd.nextLong();

   if(a==0){
     System.out.println(a);
   }else if(b==0){
     System.out.println(n);
   }else{
   long k=a+b;
   long x;
   if(n%k>a){
     x=a;
   }else{
     x=n%k;
   }
   System.out.println(n/k*a+x);
 }
}
} public class Main{
 public static void main(String[] args) {
   Scanner kbd = new Scanner(System.in);
   long n=kbd.nextLong();
   long a=kbd.nextLong();
   long b=kbd.nextLong();

   if(a==0){
     System.out.println(a);
   }else if(b==0){
     System.out.println(n);
   }else{
   long k=a+b;
   long x;
   if(n%k>a){
     x=a;
   }else{
     x=n%k;
   }
   System.out.println(n/k*a+x);
 }
}
} Main
import java.util.Scanner;
public class Main{
 public static void main(String[] args) {
   Scanner kbd = new Scanner(System.in);
   long n=kbd.nextLong();
   long a=kbd.nextLong();
   long b=kbd.nextLong();

   if(a==0){
     System.out.println(a);
   }else if(b==0){
     System.out.println(n);
   }else{
   long k=a+b;
   long x;
   if(n%k>a){
     x=a;
   }else{
     x=n%k;
   }
   System.out.println(n/k*a+x);
 }
}
}