Add array after you read the first one. example the for travels the array and divides it by the scale, then must travel the 2 but must add the first, then travels the 3 and adds the 1 and the second. then he crosses the 3 and adds the 1 and the second. and so on until it's over.