Calculate the longest series of 1's in an integer's binary value Goal

Given a non-negative integer, create a function that returns the starting position of number of largest consecutive 1's in that integer's binary value.

When given an input 0, return 0.

If the number has multiple streaks of equal length, you must return the position of the last streak.

Input

An integer greater than or equal to 0.

Output

An integer calculated as explained below.

Rules


This is code-golf, so the shortest code in bytes in each language wins.
Standard loopholes are forbidden.




Examples and Test Cases

Example 1


Your function is passed the integer 142
142 is equal to 10001110 in binary
Longest streak is "111" (a streak of three ones)
The streak starts at the 2^1 position
Your function returns 1 as the result


Example 2


Your function is passed the integer 48
48 is equal to 110000 in binary
Longest streak is "11" (a streak of two ones)
The streak starts at the 2^4 position
Your function returns 4 as the result


Example 3


Your function is passed the integer 750
750 is equal to 1011101110 in binary
Longest streak is "111" (a streak of three ones)
Since there are two streaks of equal length, we return the later streak.
The later streak starts at the 2^5 position
Your function returns 5 as the result
JavaScript (ES6),  33  32 bytes
f=x=&gt;x&amp;(k=x&gt;&gt;1)?f(x&amp;k):k&amp;&amp;1+f(k)

Try it online!

JavaScript (ES6),  41 40 36  34 bytes
Saved 4 bytes thanks to @ThePirateBay
f=x=&gt;(k=x&amp;x/2)?f(k):Math.log2(x)|0

Try it online!
How?
General case x &gt; 0
We recursively AND the input x with x / 2 which progressively reduces the patterns of consecutive set bits until only the rightmost bit of the sequence remains. We keep a copy of the last non-zero value and determine the position of its most significant bit by floor-rounding its base-2 logarithm.
Below are the steps we go through for x = 750 (1011101110 in binary).
    1011101110 --.
,----------------'
'-&gt; 1011101110
AND 0101110111
    ----------
=   0001100110 --.
,----------------'
'-&gt; 0001100110
AND 0000110011
    ----------
=   0000100010 --.  --&gt; output = position of MSB = 5  (0000100010)
,----------------'                                         ^
'-&gt; 0000100010
AND 0000010001
    ----------
=   0000000000

Edge case x = 0
The special case x = 0 immediately leads to Math.log2(0) | 0. The logarithm of 0 evaluates to -Infinity and the binary bitwise OR forces a coercion to a 32-bit integer. In compliance with the specification of the abstract operation ToInt32, this gives the expected 0:

If number is NaN, +0, −0, +∞, or −∞, return
+0