Even a fair game (p=0.5) ruins you with probability (N − a) / N on finite capital. Any p < 0.5 makes ruin nearly certain — verify it by experiment.
Gambler's Ruin: Start with $a, bet until you reach $N or go broke at $0. Fair game (p=0.5): ruin probability is (N − a) / N. Bias it and ruin grows exponentially. Verify the theoretical ruin for the current settings with Monte Carlo.