Spectrum of ballooning instabilities in a stellarator