设等差数列{an}的前n项和为Sn,且满足S15>0,S16<0,则当Sn最大时,n=(  )