H, A, D = map(int, input().split()) # Initialize DP array, dp[h] represents the minimal expected attacks to reduce health h to 0 max_h = H dp = [float('inf')] * (max_h + 1) dp[0] = 0.0 for h in range(1, max_h + 1): # Calculate regular attack's expectation if h <= A: regular = 1.0 else: regular = 1.0 + dp[h - A] # Calculate special attack's expectation if h <= D: special = 1.5 else: special = (3.0 + 2.0 * dp[h - D]) / 2.0 # Choose the minimal expectation dp[h] = min(regular, special) # Output with precision handling to meet the problem's requirements print("{0:.10f}".format(dp[H]).rstrip('0').rstrip('.') if '.' in "{0:.10f}".format(dp[H]) else int(dp[H]))