import java.util.Scanner;

public class Main {
    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);

        final int N = sc.nextInt();
        final int K = sc.nextInt();
        System.out.println(Integer.toString(Integer.parseInt(Integer.toBinaryString(N), 2), K).length());
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);

        final int N = sc.nextInt();
        final int K = sc.nextInt();
        System.out.println(Integer.toString(Integer.parseInt(Integer.toBinaryString(N), 2), K).length());
    }
} Main public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);

        final int N = sc.nextInt();
        final int K = sc.nextInt();
        System.out.println(Integer.toString(Integer.parseInt(Integer.toBinaryString(N), 2), K).length());
    } main {
        Scanner sc = new Scanner(System.in);

        final int N = sc.nextInt();
        final int K = sc.nextInt();
        System.out.println(Integer.toString(Integer.parseInt(Integer.toBinaryString(N), 2), K).length());
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc final int K = sc.nextInt(); K sc.nextInt() sc.nextInt sc System.out.println(Integer.toString(Integer.parseInt(Integer.toBinaryString(N), 2), K).length()) System.out.println System.out System System.out Integer.toString(Integer.parseInt(Integer.toBinaryString(N), 2), K).length() Integer.toString(Integer.parseInt(Integer.toBinaryString(N), 2), K).length Integer.toString(Integer.parseInt(Integer.toBinaryString(N), 2), K) Integer.toString Integer Integer.parseInt(Integer.toBinaryString(N), 2) Integer.parseInt Integer Integer.toBinaryString(N) Integer.toBinaryString Integer N 2 K String[] args args public class Main {
    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);

        final int N = sc.nextInt();
        final int K = sc.nextInt();
        System.out.println(Integer.toString(Integer.parseInt(Integer.toBinaryString(N), 2), K).length());
    }
} public class Main {
    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);

        final int N = sc.nextInt();
        final int K = sc.nextInt();
        System.out.println(Integer.toString(Integer.parseInt(Integer.toBinaryString(N), 2), K).length());
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);

        final int N = sc.nextInt();
        final int K = sc.nextInt();
        System.out.println(Integer.toString(Integer.parseInt(Integer.toBinaryString(N), 2), K).length());
    }
}
