combinatrics solved, but made use of 50 digit long numbers at some point