import java.util.Scanner;

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

        int n = 10;
		int m = K;
		String s = Integer.toString(Integer.parseInt(String.valueOf(N) ,n),m);



        int A = s.length();
        System.out.println(A);
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) {
      	Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();

        int n = 10;
		int m = K;
		String s = Integer.toString(Integer.parseInt(String.valueOf(N) ,n),m);



        int A = s.length();
        System.out.println(A);
    }
} Main public static void main(String[] args) {
      	Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();

        int n = 10;
		int m = K;
		String s = Integer.toString(Integer.parseInt(String.valueOf(N) ,n),m);



        int A = s.length();
        System.out.println(A);
    } main {
      	Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();

        int n = 10;
		int m = K;
		String s = Integer.toString(Integer.parseInt(String.valueOf(N) ,n),m);



        int A = s.length();
        System.out.println(A);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int K = sc.nextInt(); K sc.nextInt() sc.nextInt sc int n = 10; n 10 int m = K; m K String s = Integer.toString(Integer.parseInt(String.valueOf(N) ,n),m); s Integer.toString(Integer.parseInt(String.valueOf(N) ,n),m) Integer.toString Integer Integer.parseInt(String.valueOf(N) ,n) Integer.parseInt Integer String.valueOf(N) String.valueOf String N n m int A = s.length(); A s.length() s.length s System.out.println(A) System.out.println System.out System System.out A String[] args args
import java.util.Scanner;

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

        int n = 10;
		int m = K;
		String s = Integer.toString(Integer.parseInt(String.valueOf(N) ,n),m);



        int A = s.length();
        System.out.println(A);
    }
}
