Run id: 116272

------Input------
4 500
------Answer-----
317
------Your output-----
407