Question from the General knowledge for developers test

Write an algorithm to find the sum of the first 1000000 integers.