package yukicoder023; import java.util.Arrays; import java.util.Scanner; public class Main { static int h,a,d; static double[] memo=new double[100000]; public static void main(String[] args){ Arrays.fill(memo, -1); Scanner sc=new Scanner(System.in); h=sc.nextInt();//敵の体力 a=sc.nextInt();//通常攻撃の威力 d=sc.nextInt();//必殺技の威力 System.out.println(dp(h)); sc.close(); } public static double dp(int x){ if(x<=0)return 0; if(memo[x]>=0)return memo[x]; return memo[x]=Math.min(dp(x-a)+1,dp(x-d)+1.5); } }