import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in =new Scanner(System.in);
        int a=in.nextInt();
        int b=in.nextInt();
        String s=Integer.toString(Integer.parseInt(String.valueOf(a),10),b);
        System.out.println(s.length());
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner in =new Scanner(System.in);
        int a=in.nextInt();
        int b=in.nextInt();
        String s=Integer.toString(Integer.parseInt(String.valueOf(a),10),b);
        System.out.println(s.length());
    }
} Main public static void main(String[] args) {
        Scanner in =new Scanner(System.in);
        int a=in.nextInt();
        int b=in.nextInt();
        String s=Integer.toString(Integer.parseInt(String.valueOf(a),10),b);
        System.out.println(s.length());
    } main {
        Scanner in =new Scanner(System.in);
        int a=in.nextInt();
        int b=in.nextInt();
        String s=Integer.toString(Integer.parseInt(String.valueOf(a),10),b);
        System.out.println(s.length());
    } Scanner in =new Scanner(System.in); in new Scanner(System.in) int a=in.nextInt(); a in.nextInt() in.nextInt in int b=in.nextInt(); b in.nextInt() in.nextInt in String s=Integer.toString(Integer.parseInt(String.valueOf(a),10),b); s Integer.toString(Integer.parseInt(String.valueOf(a),10),b) Integer.toString Integer Integer.parseInt(String.valueOf(a),10) Integer.parseInt Integer String.valueOf(a) String.valueOf String a 10 b System.out.println(s.length()) System.out.println System.out System System.out s.length() s.length s String[] args args public class Main {
    public static void main(String[] args) {
        Scanner in =new Scanner(System.in);
        int a=in.nextInt();
        int b=in.nextInt();
        String s=Integer.toString(Integer.parseInt(String.valueOf(a),10),b);
        System.out.println(s.length());
    }
} public class Main {
    public static void main(String[] args) {
        Scanner in =new Scanner(System.in);
        int a=in.nextInt();
        int b=in.nextInt();
        String s=Integer.toString(Integer.parseInt(String.valueOf(a),10),b);
        System.out.println(s.length());
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in =new Scanner(System.in);
        int a=in.nextInt();
        int b=in.nextInt();
        String s=Integer.toString(Integer.parseInt(String.valueOf(a),10),b);
        System.out.println(s.length());
    }
}
