Problem 29

Again cheating due to the BigInteger class