Run id: 348

------Input------
10001 16
------Answer-----
2711
------Your output-----