Refactor Euler #16 solution to not use $-