My try at Project Euler 104