first attempt at Project Euler Q3