import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String N = sc.next();
    long n = Long.parseLong(N);
    String A = sc.next();
    long a = Long.parseLong(A);
    String B = sc.next();
    long b = Long.parseLong(B);
    long buf;
    long rem;
    long ans;

    buf = n / (a + b);
    rem = n - buf * (a + b);
    if(rem > a){
      ans = (buf + 1) * a;
    } else {
      ans = buf * a + rem;
    }
    System.out.println(ans);
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String N = sc.next();
    long n = Long.parseLong(N);
    String A = sc.next();
    long a = Long.parseLong(A);
    String B = sc.next();
    long b = Long.parseLong(B);
    long buf;
    long rem;
    long ans;

    buf = n / (a + b);
    rem = n - buf * (a + b);
    if(rem > a){
      ans = (buf + 1) * a;
    } else {
      ans = buf * a + rem;
    }
    System.out.println(ans);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String N = sc.next();
    long n = Long.parseLong(N);
    String A = sc.next();
    long a = Long.parseLong(A);
    String B = sc.next();
    long b = Long.parseLong(B);
    long buf;
    long rem;
    long ans;

    buf = n / (a + b);
    rem = n - buf * (a + b);
    if(rem > a){
      ans = (buf + 1) * a;
    } else {
      ans = buf * a + rem;
    }
    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    String N = sc.next();
    long n = Long.parseLong(N);
    String A = sc.next();
    long a = Long.parseLong(A);
    String B = sc.next();
    long b = Long.parseLong(B);
    long buf;
    long rem;
    long ans;

    buf = n / (a + b);
    rem = n - buf * (a + b);
    if(rem > a){
      ans = (buf + 1) * a;
    } else {
      ans = buf * a + rem;
    }
    System.out.println(ans);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String N = sc.next(); N sc.next() sc.next sc long n = Long.parseLong(N); n Long.parseLong(N) Long.parseLong Long N String A = sc.next(); A sc.next() sc.next sc long a = Long.parseLong(A); a Long.parseLong(A) Long.parseLong Long A String B = sc.next(); B sc.next() sc.next sc long b = Long.parseLong(B); b Long.parseLong(B) Long.parseLong Long B long buf; buf long rem; rem long ans; ans buf = n / (a + b) buf n / (a + b) n (a + b) a b rem = n - buf * (a + b) rem n - buf * (a + b) n buf * (a + b) buf (a + b) a b if(rem > a){
      ans = (buf + 1) * a;
    } else {
      ans = buf * a + rem;
    } rem > a rem a {
      ans = (buf + 1) * a;
    } ans = (buf + 1) * a ans (buf + 1) * a (buf + 1) buf 1 a {
      ans = buf * a + rem;
    } ans = buf * a + rem ans buf * a + rem buf * a buf a rem 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);
    String N = sc.next();
    long n = Long.parseLong(N);
    String A = sc.next();
    long a = Long.parseLong(A);
    String B = sc.next();
    long b = Long.parseLong(B);
    long buf;
    long rem;
    long ans;

    buf = n / (a + b);
    rem = n - buf * (a + b);
    if(rem > a){
      ans = (buf + 1) * a;
    } else {
      ans = buf * a + rem;
    }
    System.out.println(ans);
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String N = sc.next();
    long n = Long.parseLong(N);
    String A = sc.next();
    long a = Long.parseLong(A);
    String B = sc.next();
    long b = Long.parseLong(B);
    long buf;
    long rem;
    long ans;

    buf = n / (a + b);
    rem = n - buf * (a + b);
    if(rem > a){
      ans = (buf + 1) * a;
    } else {
      ans = buf * a + rem;
    }
    System.out.println(ans);
  }
} Main
import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String N = sc.next();
    long n = Long.parseLong(N);
    String A = sc.next();
    long a = Long.parseLong(A);
    String B = sc.next();
    long b = Long.parseLong(B);
    long buf;
    long rem;
    long ans;

    buf = n / (a + b);
    rem = n - buf * (a + b);
    if(rem > a){
      ans = (buf + 1) * a;
    } else {
      ans = buf * a + rem;
    }
    System.out.println(ans);
  }
}
