#include <stdio.h>

int max(int a, int b) {
    return (a > b) ? a : b;
}

int main() {
    int k, n;
    scanf("%d %d", &k, &n);

    if (k < 1 || k > 100 || n < 1 || n > 10000) {
        printf("Invalid input\n");
        return 0;
    }

    int dp[k + 1][n + 1];

    // If we have 0 floors => 0 attempts needed
    // If we have 1 floor => 1 attempt needed
    for (int i = 1; i <= k; i++) {
        dp[i][0] = 0;
        dp[i][1] = 1;
    }

    // With 1 drone => need j attempts for j floors
    for (int j = 1; j <= n; j++) {
        dp[1][j] = j;
    }

    // Fill rest of the table
    for (int i = 2; i <= k; i++) {
        for (int j = 2; j <= n; j++) {
            dp[i][j] = n; // Worst case init

            for (int x = 1; x <= j; x++) {
                int res = 1 + max(dp[i - 1][x - 1], dp[i][j - x]);
                if (res < dp[i][j])
                    dp[i][j] = res;
            }
        }
    }

    printf("%d\n", dp[k][n]);
    return 0;
}