Run id: 99678

------Input------
3
------Answer-----
31
------Your output-----
3129