Maximum Subsegment Sum (SPOJ GSS1)