<p>A certain bug's home is on the x-axis at position <code>x</code>. Help them get there from position <code>0</code>.</p>
<p>The bug jumps according to the following rules:</p>
<ul>
<li>It can jump exactly <code>a</code> positions <strong>forward</strong> (to the right).</li>
<li>It can jump exactly <code>b</code> positions <strong>backward</strong> (to the left).</li>
<li>It cannot jump backward twice in a row.</li>
<li>It cannot jump to any <code>forbidden</code> positions.</li>
</ul>
<p>The bug may jump forward <strong>beyond</strong> its home, but it <strong>cannot jump</strong> to positions numbered with <strong>negative</strong> integers.</p>
<p>Given an array of integers <code>forbidden</code>, where <code>forbidden[i]</code> means that the bug cannot jump to the position <code>forbidden[i]</code>, and integers <code>a</code>, <code>b</code>, and <code>x</code>, return <em>the minimum number of jumps needed for the bug to reach its home</em>. If there is no possible sequence of jumps that lands the bug on position <code>x</code>, return <code>-1.</code></p>