import java.util.*;
public class Main{
  public static void main(String[] args) {
    //入力
    Scanner sc = new Scanner(System.in);
//全体の個数
long N =sc.nextLong();
//Aは青の個数
long A =sc.nextLong();
//Bは赤の個数
long B =sc.nextLong();
//カウント変数
long cnt = 0;
//青と赤のセットの数
long set = (long)(N/(A+B));
cnt = set*A;
if(N%(A+B) == 0){
  System.out.println(cnt);
}else{
  //セットを並べたときの個数
  long ball =set*(A+B);
  if(N-ball >= A){
    System.out.println(cnt+A);
  }else{
    System.out.println(cnt+(N-ball));
  }
  
}

}

}

/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz