euler 2 in c++