Sums up numbers from 1 to n