main :: IO ()
main = do
  { [a,b] <- readLineInputs
  ; print $ solve a b
  }
  
readLineInputs :: Read a => IO [a]
readLineInputs = map read . words <$> getLine

(<$>) :: (a -> b) -> IO a -> IO b
(<$>) = fmap

solve :: Int -> Int -> Int
solve a b = iter a b 1 0
  where
    iter a b c d = if b <= c then d
      else iter a b (pred c + a) (succ d)
