add_b :: Int -> Int -> Int -> Int
add_b x b c
    | x < b = 0
    | otherwise = 1 + add_b x (b + c) c

main = do
    
    xs <- getLine
    as <- getLine
    bs <- getLine

    let a = read as
        b = read bs
        x = read xs
    
    print $ x - a - ((add_b (x - a) b b) * b)