let ``No.804 野菜が苦手``() = let a, b, c, d = stdin.ReadLine().Split(' ') |> Array.map (int) |> fun args -> args.[0] , args.[1], args.[2], args.[3] let rec loop v m pw pc = if v > a || m > b || (pc < v + v * pw) then loop (v-1) ((v-1)*pw) pw pc else v loop a (a*c) c d |> stdout.WriteLine () ``No.804 野菜が苦手``()