5th Euler problem, done in C. First attempt