According to lemma 4 of 

M.F. Atiyah, *Vector bundles over an elliptic curve*,  Proc. London Math. Soc. (3) 7 (1957), 414-452.

you could take $N(g,n) = - 2 g$.