The above is a d2 or d3 problem if one tries simulation or algebraic solution.
Now solve it d1!
Non negative integers, of course !
Source: appeared as a question and an answer(super complicated!)in QUORA
blackjack
flooble's webmaster puzzle