Subin is watching TV. Some numeric buttons on the remote control are broken, so it may be impossible to enter every desired channel number directly.
The remote has numeric buttons from 0 through 9 and the + and - buttons. Pressing + moves to the channel that is 1 higher than the current channel, and pressing - moves to the channel that is 1 lower. If - is pressed on channel 0, the channel stays at 0. There is no upper limit on channel numbers.
The current channel is 100. Given the list of broken numeric buttons, find the minimum number of button presses needed to move to the target channel N.