import java.io.*;
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {

    try {
      // 標準入力受け取り
      Scanner scan = new Scanner(System.in);      
      Long sum      = Long.parseLong(scan.next());
      Long blue     = Long.parseLong(scan.next());
      Long red      = Long.parseLong(scan.next());
      Long result;
      
      //算出
      if(sum%(blue+red)<=blue) {
        result = sum/(blue+red)*blue+sum%(blue+red);
      } else {
        result = sum/(blue+red)*blue+blue;
      }
      
      System.out.println(result);
      
    } catch (Exception e) {     
      System.out.print("error");
    }
  }
} import java.io.*; io.* java import java.util.Scanner; Scanner java.util public class Main {

  public static void main(String[] args) {

    try {
      // 標準入力受け取り
      Scanner scan = new Scanner(System.in);      
      Long sum      = Long.parseLong(scan.next());
      Long blue     = Long.parseLong(scan.next());
      Long red      = Long.parseLong(scan.next());
      Long result;
      
      //算出
      if(sum%(blue+red)<=blue) {
        result = sum/(blue+red)*blue+sum%(blue+red);
      } else {
        result = sum/(blue+red)*blue+blue;
      }
      
      System.out.println(result);
      
    } catch (Exception e) {     
      System.out.print("error");
    }
  }
} Main public static void main(String[] args) {

    try {
      // 標準入力受け取り
      Scanner scan = new Scanner(System.in);      
      Long sum      = Long.parseLong(scan.next());
      Long blue     = Long.parseLong(scan.next());
      Long red      = Long.parseLong(scan.next());
      Long result;
      
      //算出
      if(sum%(blue+red)<=blue) {
        result = sum/(blue+red)*blue+sum%(blue+red);
      } else {
        result = sum/(blue+red)*blue+blue;
      }
      
      System.out.println(result);
      
    } catch (Exception e) {     
      System.out.print("error");
    }
  } main {

    try {
      // 標準入力受け取り
      Scanner scan = new Scanner(System.in);      
      Long sum      = Long.parseLong(scan.next());
      Long blue     = Long.parseLong(scan.next());
      Long red      = Long.parseLong(scan.next());
      Long result;
      
      //算出
      if(sum%(blue+red)<=blue) {
        result = sum/(blue+red)*blue+sum%(blue+red);
      } else {
        result = sum/(blue+red)*blue+blue;
      }
      
      System.out.println(result);
      
    } catch (Exception e) {     
      System.out.print("error");
    }
  } try {
      // 標準入力受け取り
      Scanner scan = new Scanner(System.in);      
      Long sum      = Long.parseLong(scan.next());
      Long blue     = Long.parseLong(scan.next());
      Long red      = Long.parseLong(scan.next());
      Long result;
      
      //算出
      if(sum%(blue+red)<=blue) {
        result = sum/(blue+red)*blue+sum%(blue+red);
      } else {
        result = sum/(blue+red)*blue+blue;
      }
      
      System.out.println(result);
      
    } catch (Exception e) {     
      System.out.print("error");
    } catch (Exception e) {     
      System.out.print("error");
    } Exception e {     
      System.out.print("error");
    } System.out.print("error") System.out.print System.out System System.out "error" {
      // 標準入力受け取り
      Scanner scan = new Scanner(System.in);      
      Long sum      = Long.parseLong(scan.next());
      Long blue     = Long.parseLong(scan.next());
      Long red      = Long.parseLong(scan.next());
      Long result;
      
      //算出
      if(sum%(blue+red)<=blue) {
        result = sum/(blue+red)*blue+sum%(blue+red);
      } else {
        result = sum/(blue+red)*blue+blue;
      }
      
      System.out.println(result);
      
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) Long sum      = Long.parseLong(scan.next()); sum Long.parseLong(scan.next()) Long.parseLong Long scan.next() scan.next scan Long blue     = Long.parseLong(scan.next()); blue Long.parseLong(scan.next()) Long.parseLong Long scan.next() scan.next scan Long red      = Long.parseLong(scan.next()); red Long.parseLong(scan.next()) Long.parseLong Long scan.next() scan.next scan Long result; result if(sum%(blue+red)<=blue) {
        result = sum/(blue+red)*blue+sum%(blue+red);
      } else {
        result = sum/(blue+red)*blue+blue;
      } sum%(blue+red)<=blue sum%(blue+red) sum (blue+red) blue red blue {
        result = sum/(blue+red)*blue+sum%(blue+red);
      } result = sum/(blue+red)*blue+sum%(blue+red) result sum/(blue+red)*blue+sum%(blue+red) sum/(blue+red)*blue sum/(blue+red) sum (blue+red) blue red blue sum%(blue+red) sum (blue+red) blue red {
        result = sum/(blue+red)*blue+blue;
      } result = sum/(blue+red)*blue+blue result sum/(blue+red)*blue+blue sum/(blue+red)*blue sum/(blue+red) sum (blue+red) blue red blue blue System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {

  public static void main(String[] args) {

    try {
      // 標準入力受け取り
      Scanner scan = new Scanner(System.in);      
      Long sum      = Long.parseLong(scan.next());
      Long blue     = Long.parseLong(scan.next());
      Long red      = Long.parseLong(scan.next());
      Long result;
      
      //算出
      if(sum%(blue+red)<=blue) {
        result = sum/(blue+red)*blue+sum%(blue+red);
      } else {
        result = sum/(blue+red)*blue+blue;
      }
      
      System.out.println(result);
      
    } catch (Exception e) {     
      System.out.print("error");
    }
  }
} public class Main {

  public static void main(String[] args) {

    try {
      // 標準入力受け取り
      Scanner scan = new Scanner(System.in);      
      Long sum      = Long.parseLong(scan.next());
      Long blue     = Long.parseLong(scan.next());
      Long red      = Long.parseLong(scan.next());
      Long result;
      
      //算出
      if(sum%(blue+red)<=blue) {
        result = sum/(blue+red)*blue+sum%(blue+red);
      } else {
        result = sum/(blue+red)*blue+blue;
      }
      
      System.out.println(result);
      
    } catch (Exception e) {     
      System.out.print("error");
    }
  }
} Main
import java.io.*;
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {

    try {
      // 標準入力受け取り
      Scanner scan = new Scanner(System.in);      
      Long sum      = Long.parseLong(scan.next());
      Long blue     = Long.parseLong(scan.next());
      Long red      = Long.parseLong(scan.next());
      Long result;
      
      //算出
      if(sum%(blue+red)<=blue) {
        result = sum/(blue+red)*blue+sum%(blue+red);
      } else {
        result = sum/(blue+red)*blue+blue;
      }
      
      System.out.println(result);
      
    } catch (Exception e) {     
      System.out.print("error");
    }
  }
}
