Simulate an M sided die using an N sided die