import java.util.Scanner;
import java.math.BigInteger;
class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    BigInteger n = sc.nextBigInteger(); 
    BigInteger b = sc.nextBigInteger(); 
    BigInteger r = sc.nextBigInteger();
    sc.close();
    if(b.equals(new BigInteger("0"))) {
      System.out.println("0");
    } else {
      BigInteger lp = b.add(r);
      BigInteger nDiv = n.divide(lp);
      BigInteger rem = n.mod(lp);
      BigInteger remMinRed = rem.subtract(r);
      BigInteger lpTimesBlue = nDiv.multiply(b);
      if(rem.compareTo(b) == 0) {
        System.out.println(lpTimesBlue);
      } else if(rem.compareTo(b) == 1) {
        System.out.println(lpTimesBlue.add(b));
      } else {
        System.out.println(lpTimesBlue.add(rem));
      }
    }
  }
} import java.util.Scanner; Scanner java.util import java.math.BigInteger; BigInteger java.math class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    BigInteger n = sc.nextBigInteger(); 
    BigInteger b = sc.nextBigInteger(); 
    BigInteger r = sc.nextBigInteger();
    sc.close();
    if(b.equals(new BigInteger("0"))) {
      System.out.println("0");
    } else {
      BigInteger lp = b.add(r);
      BigInteger nDiv = n.divide(lp);
      BigInteger rem = n.mod(lp);
      BigInteger remMinRed = rem.subtract(r);
      BigInteger lpTimesBlue = nDiv.multiply(b);
      if(rem.compareTo(b) == 0) {
        System.out.println(lpTimesBlue);
      } else if(rem.compareTo(b) == 1) {
        System.out.println(lpTimesBlue.add(b));
      } else {
        System.out.println(lpTimesBlue.add(rem));
      }
    }
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    BigInteger n = sc.nextBigInteger(); 
    BigInteger b = sc.nextBigInteger(); 
    BigInteger r = sc.nextBigInteger();
    sc.close();
    if(b.equals(new BigInteger("0"))) {
      System.out.println("0");
    } else {
      BigInteger lp = b.add(r);
      BigInteger nDiv = n.divide(lp);
      BigInteger rem = n.mod(lp);
      BigInteger remMinRed = rem.subtract(r);
      BigInteger lpTimesBlue = nDiv.multiply(b);
      if(rem.compareTo(b) == 0) {
        System.out.println(lpTimesBlue);
      } else if(rem.compareTo(b) == 1) {
        System.out.println(lpTimesBlue.add(b));
      } else {
        System.out.println(lpTimesBlue.add(rem));
      }
    }
  } main {
    Scanner sc = new Scanner(System.in);
    BigInteger n = sc.nextBigInteger(); 
    BigInteger b = sc.nextBigInteger(); 
    BigInteger r = sc.nextBigInteger();
    sc.close();
    if(b.equals(new BigInteger("0"))) {
      System.out.println("0");
    } else {
      BigInteger lp = b.add(r);
      BigInteger nDiv = n.divide(lp);
      BigInteger rem = n.mod(lp);
      BigInteger remMinRed = rem.subtract(r);
      BigInteger lpTimesBlue = nDiv.multiply(b);
      if(rem.compareTo(b) == 0) {
        System.out.println(lpTimesBlue);
      } else if(rem.compareTo(b) == 1) {
        System.out.println(lpTimesBlue.add(b));
      } else {
        System.out.println(lpTimesBlue.add(rem));
      }
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) BigInteger n = sc.nextBigInteger(); n sc.nextBigInteger() sc.nextBigInteger sc BigInteger b = sc.nextBigInteger(); b sc.nextBigInteger() sc.nextBigInteger sc BigInteger r = sc.nextBigInteger(); r sc.nextBigInteger() sc.nextBigInteger sc sc.close() sc.close sc if(b.equals(new BigInteger("0"))) {
      System.out.println("0");
    } else {
      BigInteger lp = b.add(r);
      BigInteger nDiv = n.divide(lp);
      BigInteger rem = n.mod(lp);
      BigInteger remMinRed = rem.subtract(r);
      BigInteger lpTimesBlue = nDiv.multiply(b);
      if(rem.compareTo(b) == 0) {
        System.out.println(lpTimesBlue);
      } else if(rem.compareTo(b) == 1) {
        System.out.println(lpTimesBlue.add(b));
      } else {
        System.out.println(lpTimesBlue.add(rem));
      }
    } b.equals(new BigInteger("0")) b.equals b new BigInteger("0") {
      System.out.println("0");
    } System.out.println("0") System.out.println System.out System System.out "0" {
      BigInteger lp = b.add(r);
      BigInteger nDiv = n.divide(lp);
      BigInteger rem = n.mod(lp);
      BigInteger remMinRed = rem.subtract(r);
      BigInteger lpTimesBlue = nDiv.multiply(b);
      if(rem.compareTo(b) == 0) {
        System.out.println(lpTimesBlue);
      } else if(rem.compareTo(b) == 1) {
        System.out.println(lpTimesBlue.add(b));
      } else {
        System.out.println(lpTimesBlue.add(rem));
      }
    } BigInteger lp = b.add(r); lp b.add(r) b.add b r BigInteger nDiv = n.divide(lp); nDiv n.divide(lp) n.divide n lp BigInteger rem = n.mod(lp); rem n.mod(lp) n.mod n lp BigInteger remMinRed = rem.subtract(r); remMinRed rem.subtract(r) rem.subtract rem r BigInteger lpTimesBlue = nDiv.multiply(b); lpTimesBlue nDiv.multiply(b) nDiv.multiply nDiv b if(rem.compareTo(b) == 0) {
        System.out.println(lpTimesBlue);
      } else if(rem.compareTo(b) == 1) {
        System.out.println(lpTimesBlue.add(b));
      } else {
        System.out.println(lpTimesBlue.add(rem));
      } rem.compareTo(b) == 0 rem.compareTo(b) rem.compareTo rem b 0 {
        System.out.println(lpTimesBlue);
      } System.out.println(lpTimesBlue) System.out.println System.out System System.out lpTimesBlue if(rem.compareTo(b) == 1) {
        System.out.println(lpTimesBlue.add(b));
      } else {
        System.out.println(lpTimesBlue.add(rem));
      } rem.compareTo(b) == 1 rem.compareTo(b) rem.compareTo rem b 1 {
        System.out.println(lpTimesBlue.add(b));
      } System.out.println(lpTimesBlue.add(b)) System.out.println System.out System System.out lpTimesBlue.add(b) lpTimesBlue.add lpTimesBlue b {
        System.out.println(lpTimesBlue.add(rem));
      } System.out.println(lpTimesBlue.add(rem)) System.out.println System.out System System.out lpTimesBlue.add(rem) lpTimesBlue.add lpTimesBlue rem String[] args args
import java.util.Scanner;
import java.math.BigInteger;
class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    BigInteger n = sc.nextBigInteger(); 
    BigInteger b = sc.nextBigInteger(); 
    BigInteger r = sc.nextBigInteger();
    sc.close();
    if(b.equals(new BigInteger("0"))) {
      System.out.println("0");
    } else {
      BigInteger lp = b.add(r);
      BigInteger nDiv = n.divide(lp);
      BigInteger rem = n.mod(lp);
      BigInteger remMinRed = rem.subtract(r);
      BigInteger lpTimesBlue = nDiv.multiply(b);
      if(rem.compareTo(b) == 0) {
        System.out.println(lpTimesBlue);
      } else if(rem.compareTo(b) == 1) {
        System.out.println(lpTimesBlue.add(b));
      } else {
        System.out.println(lpTimesBlue.add(rem));
      }
    }
  }
}
