package no023; import java.util.Scanner; public class Main { public static void main(String[] args) { double p = 0; double x = 2/3D; for(int i=1;i<=100;i++) { p += x * i; x /= 3; } Scanner sc = new Scanner(System.in); int h = sc.nextInt(); int a = sc.nextInt(); int d = sc.nextInt(); double[] dp = new double[h+1]; for(int i=1;i<=h;i++) { if (i <= a) { dp[i] = 1; }else{ dp[i] = Math.min(dp[i-a]+1,dp[Math.max(i-d,0)]+p); } } System.out.println(dp[h]); } }