Initialise s=0 before doing loop sum.