Chloe, the same as Vladik, is a competitive programmer. She didn't have any problems to get to the olympiad like Vladik, but she was confused by the task proposed on the olympiad.

Let's consider the following algorithm of generating a sequence of integers. Initially we have a sequence consisting of a single element equal to 1. Then we perform (n - 1) steps. On each step we take the sequence we've got on the previous step, append it to the end of itself and insert in the middle the minimum positive integer we haven't used before. For example, we get the sequence [1, 2, 1] after the first step, the sequence [1, 2, 1, 3, 1, 2, 1] after the second step.

The task is to find the value of the element with index k (the elements are numbered from 1) in the obtained sequence, i. e. after (n - 1) steps.

Please help Chloe to solve the problem!

Input

The only line contains two integers n and k (1 ≤ n ≤ 50, 1 ≤ k ≤ 2n - 1).

Output

Print single integer — the integer at the k-th position in the obtained sequence.

Examples

Input

3 2


Output

2

Input

4 8


Output

4

Note

In the first sample the obtained sequence is [1, 2, 1, 3, 1, 2, 1]. The number on the second position is 2.

In the second sample the obtained sequence is [1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1]. The number on the eighth position is 4.

import sys
from math import hypot

N = 0
cos = 0.5
sin = -(3 ** 0.5) / 2
type = 0
sqrt2 = 2 ** 0.5
sin45 = 1 / (2 ** 0.5)
size_po = 1 / (2 ** 0.5)
sin_45 = -sin45
num = [6 / 19, 6 / 19, 11 / 9, 16 / 21, 20 / 32, 22 / 18, 8 / 10]


def make_koch(n, x1, y1, x2, y2, painter):
    if n > 8:
        Window.SpinBox.setValue(8)
        return 0
    if n == 0:
        painter.drawLine(x1, y1, x2, y2)
    else:
        x3, y3 = (x2 - x1) / 3 + x1, (y2 - y1) / 3 + y1
        make_koch(n - 1, x1, y1, x3, y3, painter)
        x4, y4 = x2 - (x2 - x1) / 3, y2 - (y2 - y1) / 3
        make_koch(n - 1, x4, y4, x2, y2, painter)
        # Now we are going to turn x3, y3, x4, y4
        x5, y5 = (x4 - x3) * cos - (y4 - y3) * sin + x3, ((y4 - y3) * cos + (x4 - x3) * sin) + y3
        make_koch(n - 1, x3, y3, x5, y5, painter)
        make_koch(n - 1, x5, y5, x4, y4, painter)


def make_dima_tree(n, x1, y1, x2, y2, painter):
    painter.drawLine(x1, y1, x2, y2)
    if n > 0:
        # Now we are turning line x1, y1, x2, y2
        length = hypot(x2 - x1, y2 - y1)
        sinb = (y2 - y1) / length
        cosb = (x2 - x1) / length
        x3, y3 = sin45 * cosb - sin45 * sinb, sin45 * cosb + sin45 * sinb
        x3 *= size_po * length
        y3 *= size_po * length
        x3 += x2
        y3 += y2
        make_dima_tree(n - 1, x2, y2, x3, y3, painter)
        x3, y3 = sin45 * cosb - sin_45 * sinb, sin45 * cosb + sin_45 * sinb
        x3 *= size_po * length
        y3 *= size_po * length
        x3 += x2
        y3 += y2
        make_dima_tree(n - 1, x2, y2, x3, y3, painter)



def f(n, k):
    m = our[n]
    if m // 2 + 1 == k:
        return n
    return f(n - 1, k % (m // 2 + 1))


def make_dr(n, x1, y1, x2, y2, painter):
    if n == 0:
        painter.drawLine(x1, y1, x2, y2)
    else:
        # turning x1, y1, x2, y2
        length = hypot(x2 - x1, y2 - y1)
        sinb = (y2 - y1) / length
        cosb = (x2 - x1) / length
        x2 -= x1
        y2 -= y1
        x3 = sin45 * cosb - sin45 * sinb
        y3 = sin45 * cosb + sin45 * sinb
        x3 *= size_po * length
        y3 *= size_po * length
        x3 += x1
        y3 += y1
        x2 += x1
        y2 += y1
        make_dr(n - 1, x1, y1, x3, y3, painter)
        make_dr(n - 1, x3, y3, x2, y2, painter)


def make_dr2(n, x1, y1, x2, y2, painter):
    if n == 0:
        painter.drawLine(x1, y1, x2, y2)
    else:
        # turning x1, y1, x2, y2
        length = hypot(x2 - x1, y2 - y1)
        sinb = (y2 - y1) / length
        cosb = (x2 - x1) / length
        x2 -= x1
        y2 -= y1
        x3 = sin45 * cosb - sin45 * sinb
        y3 = sin45 * cosb + sin45 * sinb
        x3 *= size_po * length
        y3 *= size_po * length
        x3 += x1
        y3 += y1
        x2 += x1
        y2 += y1
        make_dr2(n - 1, x1, y3, x3, y1, painter)
        make_dr2(n - 1, x3, y2, x2, y3, painter)


def make_dr3(n, x1, y1, x2, y2, painter):
    if n == 0:
        painter.drawLine(x1, y1, x2, y2)
    else:
        # turning x1, y1, x2, y2
        length = hypot(x2 - x1, y2 - y1)
        sinb = (y2 - y1) / length
        cosb = (x2 - x1) / length
        x2 -= x1
        y2 -= y1
        x3 = sin45 * cosb - sin45 * sinb
        y3 = sin45 * cosb + sin45 * sinb
        x3 *= size_po * length
        y3 *= size_po * length
        x3 += x1
        y3 += y1
        x2 += x1
        y2 += y1
        make_dr3(n - 1, x1, y1, x3, y3, painter)
        make_dr3(n - 1, x2, y2, x3, y3, painter)


our = [0, 1]
n, k = map(int, input().split())
class MyWidget():
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.depth = N

    def paintEvent(self, event):
        painter = QtGui.QPainter()
        painter.begin(self)
        if type == 0:
            make_koch(self.depth, 10, self.height() - 10, self.width(), self.height() - 10, painter)
        elif type == 1:
            make_dima_tree(self.depth, self.width() / 2, self.height(), self.width() / 2, self.height() / 2, painter)
        elif type == 2:
            make_birch(self.depth, self.width() / 4, self.height() - 170, self.width() / 4, self.height() / 2.5, painter)
        elif type == 3:
            make_tree(self.depth, self.width() / 2, self.height() - 10, self.width() / 2, self.height() * 2 / 3, painter)
        elif type == 4:
            make_dr(self.depth, self.width() / 3.7, self.height() / 4.1, self.width() / 3.7 * 2.7, self.height() / 4.1, painter)
        elif type == 6:
            make_dr3(self.depth, self.width() / 4.8, self.height() / 2.5, self.width() / 6 * 5, self.height() / 2.5, painter)
        elif type == 5:
            make_dr2(self.depth, self.width() / 55, self.height() / 4.7, self.width() / 55 * 54, self.height() / 4.7, painter)
        painter.end()

    def setValue(self, depth):
        if depth > 19:
            Window.SpinBox.setValue(19)
        if self.depth != depth:
            self.depth = depth
            self.repaint()
while len(our) <= n + 1:
    our.append(our[-1] * 2 + 1)
print(f(n, k))

class MyWindow():
    def __init__(self, parent=None):
        QtGui.QMainWindow.__init__(self, parent)
        self.resize(1910, 610)
        self.setWindowTitle("Painter demo")
        self.Widget = MyWidget(self)
        self.Widget.setGeometry(0, 0, 1900, 600)
        self.setMinimumSize(300, 300)
        self.SpinBox = QtGui.QSpinBox(self)
        self.SpinBox.setGeometry(10, 10, 100, 30)
        QtCore.QObject.connect(self.SpinBox, QtCore.SIGNAL("valueChanged(int)"), self.Widget.setValue)
        self.SpinBox.setValue(5)
        self.b = QtGui.QComboBox(self)
        self.b.addItem("Прямая Коха")
        self.b.addItem("Модифицированное дерево")
        self.b.addItem("Неведомая берёза")
        self.b.addItem("Дерево")
        self.b.addItem("Кривая Леви")
        self.b.addItem("Ваза")
        self.b.addItem("Кривая Дракона")
        self.b.setGeometry(130, 10, 250, 30)
        QtCore.QObject.connect(self.b, QtCore.SIGNAL("currentIndexChanged(int)"), self.temp)
        self.b.setCurrentIndex(5)
        # self.b.emit(QtCore.SIGNAL("currentIndexChanged()"))

    def temp(self, a):
        global type
        type = self.b.currentIndex()
        self.resizeEvent(0)
        self.Widget.repaint()

    def resizeEvent(self, event):
        Y = self.height()
        X = self.width()
        dx = 0
        dy = 0
        cons = num[type]
        if Y / X > cons:
            dy = (Y - X * cons) / 2
            Y = X * cons
        elif Y / X < cons:
            dx = (X - Y / cons) / 2
            X = Y / cons
        self.Widget.setGeometry(dx, dy, X, Y)