Ad hoc, copy from ProjectEuler Problem 54