main = do
    [k, a, b] <- map read . words <$> getLine
    print $ solve a b k 1

 
solve a b k c | b - a <  2  = k + c
              | c - a <  0  = solve a b (k - 1) (c + 1)
              | k     >= 2  = let (d, m) = divMod k 2 in solve a b m (c + (b - a) * d)
              | k     == 0  = c
              | otherwise   = solve a b (k - 1) (c + 1)
 