Run id: 349

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