等差数列中,a16 a17 a18=a9=-36,前n项和为Sn.求Sn最小值,求Sn最小值时n的值