import java.util.*;
 
public class Main {
  
  public static void main(String[] args){
    
  Scanner s=new Scanner(System.in);
    
  Long S=s.nextLong();
  Long A=s.nextLong();
  Long B=s.nextLong();
  
  Long division=S/(A+B);
  Long remainder=S%(A+B);
  
  Long count;
    
  if(remainder<A) count=division*A+remainder;
  else count=division*A+A;
    
  System.out.print(count);
  }
} import java.util.*; util.* java public class Main {
  
  public static void main(String[] args){
    
  Scanner s=new Scanner(System.in);
    
  Long S=s.nextLong();
  Long A=s.nextLong();
  Long B=s.nextLong();
  
  Long division=S/(A+B);
  Long remainder=S%(A+B);
  
  Long count;
    
  if(remainder<A) count=division*A+remainder;
  else count=division*A+A;
    
  System.out.print(count);
  }
} Main public static void main(String[] args){
    
  Scanner s=new Scanner(System.in);
    
  Long S=s.nextLong();
  Long A=s.nextLong();
  Long B=s.nextLong();
  
  Long division=S/(A+B);
  Long remainder=S%(A+B);
  
  Long count;
    
  if(remainder<A) count=division*A+remainder;
  else count=division*A+A;
    
  System.out.print(count);
  } main {
    
  Scanner s=new Scanner(System.in);
    
  Long S=s.nextLong();
  Long A=s.nextLong();
  Long B=s.nextLong();
  
  Long division=S/(A+B);
  Long remainder=S%(A+B);
  
  Long count;
    
  if(remainder<A) count=division*A+remainder;
  else count=division*A+A;
    
  System.out.print(count);
  } Scanner s=new Scanner(System.in); s new Scanner(System.in) Long S=s.nextLong(); S s.nextLong() s.nextLong s Long A=s.nextLong(); A s.nextLong() s.nextLong s Long B=s.nextLong(); B s.nextLong() s.nextLong s Long division=S/(A+B); division S/(A+B) S (A+B) A B Long remainder=S%(A+B); remainder S%(A+B) S (A+B) A B Long count; count if(remainder<A) count=division*A+remainder;
  else count=division*A+A; remainder<A remainder A count=division*A+remainder count division*A+remainder division*A division A remainder count=division*A+A count division*A+A division*A division A A System.out.print(count) System.out.print System.out System System.out count String[] args args public class Main {
  
  public static void main(String[] args){
    
  Scanner s=new Scanner(System.in);
    
  Long S=s.nextLong();
  Long A=s.nextLong();
  Long B=s.nextLong();
  
  Long division=S/(A+B);
  Long remainder=S%(A+B);
  
  Long count;
    
  if(remainder<A) count=division*A+remainder;
  else count=division*A+A;
    
  System.out.print(count);
  }
} public class Main {
  
  public static void main(String[] args){
    
  Scanner s=new Scanner(System.in);
    
  Long S=s.nextLong();
  Long A=s.nextLong();
  Long B=s.nextLong();
  
  Long division=S/(A+B);
  Long remainder=S%(A+B);
  
  Long count;
    
  if(remainder<A) count=division*A+remainder;
  else count=division*A+A;
    
  System.out.print(count);
  }
} Main
import java.util.*;
 
public class Main {
  
  public static void main(String[] args){
    
  Scanner s=new Scanner(System.in);
    
  Long S=s.nextLong();
  Long A=s.nextLong();
  Long B=s.nextLong();
  
  Long division=S/(A+B);
  Long remainder=S%(A+B);
  
  Long count;
    
  if(remainder<A) count=division*A+remainder;
  else count=division*A+A;
    
  System.out.print(count);
  }
}
