import 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 x = N/(A+B);
    long y = N%(A+B);
    if(y==0){
      System.out.println(x*A);
    }else{
      if(A>=y){
        System.out.println((x*A)+y);
      }else{
        System.out.println((x*A)+A);
      }
    }

  }
} import java.util.*; util.* java 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 x = N/(A+B);
    long y = N%(A+B);
    if(y==0){
      System.out.println(x*A);
    }else{
      if(A>=y){
        System.out.println((x*A)+y);
      }else{
        System.out.println((x*A)+A);
      }
    }

  }
} 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 x = N/(A+B);
    long y = N%(A+B);
    if(y==0){
      System.out.println(x*A);
    }else{
      if(A>=y){
        System.out.println((x*A)+y);
      }else{
        System.out.println((x*A)+A);
      }
    }

  } main {
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    Long A = sc.nextLong();
    long B = sc.nextLong();
    long x = N/(A+B);
    long y = N%(A+B);
    if(y==0){
      System.out.println(x*A);
    }else{
      if(A>=y){
        System.out.println((x*A)+y);
      }else{
        System.out.println((x*A)+A);
      }
    }

  } 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 x = N/(A+B); x N/(A+B) N (A+B) A B long y = N%(A+B); y N%(A+B) N (A+B) A B if(y==0){
      System.out.println(x*A);
    }else{
      if(A>=y){
        System.out.println((x*A)+y);
      }else{
        System.out.println((x*A)+A);
      }
    } y==0 y 0 {
      System.out.println(x*A);
    } System.out.println(x*A) System.out.println System.out System System.out x*A x A {
      if(A>=y){
        System.out.println((x*A)+y);
      }else{
        System.out.println((x*A)+A);
      }
    } if(A>=y){
        System.out.println((x*A)+y);
      }else{
        System.out.println((x*A)+A);
      } A>=y A y {
        System.out.println((x*A)+y);
      } System.out.println((x*A)+y) System.out.println System.out System System.out (x*A)+y (x*A) x A y {
        System.out.println((x*A)+A);
      } System.out.println((x*A)+A) System.out.println System.out System System.out (x*A)+A (x*A) x A A 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 x = N/(A+B);
    long y = N%(A+B);
    if(y==0){
      System.out.println(x*A);
    }else{
      if(A>=y){
        System.out.println((x*A)+y);
      }else{
        System.out.println((x*A)+A);
      }
    }

  }
} 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 x = N/(A+B);
    long y = N%(A+B);
    if(y==0){
      System.out.println(x*A);
    }else{
      if(A>=y){
        System.out.println((x*A)+y);
      }else{
        System.out.println((x*A)+A);
      }
    }

  }
} Main
import 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 x = N/(A+B);
    long y = N%(A+B);
    if(y==0){
      System.out.println(x*A);
    }else{
      if(A>=y){
        System.out.println((x*A)+y);
      }else{
        System.out.println((x*A)+A);
      }
    }

  }
}
