project euler: problem #1 solution