Euler problem #4