let rec fb a b numA =
    if numA >= b then numA
    else
        let tmpNum =
          if numA = 0 then 0
          elif numA = 1 then a
          else a + (a-1) * (numA-1)
        if tmpNum >= b then numA
        else fb a b (numA+1)

//let input = [| [|4, 10|]; [| 8, 9 |]; [| 8, 8 |] |]
//for [|a,b|] in input do fb a b 0 |> printfn "%d"

[<EntryPoint>]
let main argv =
    let input = stdin.ReadLine().Split(' ') |> Array.map int
    let a = input.[0]
    let b = input.[1]
    fb a b 0 |> printfn "%d"
    0