Euler c solution #24