program main
    implicit none
    integer:: A, B
    integer:: i, c_num, e_num

    read*, A, B
    c_num = 1

    do while(c_num < B)
        c_num = c_num - 1
        c_num = c_num + A
        e_num = e_num + 1
    enddo

    print'(i0)', e_num
end program
