import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
		String S = Integer.toString(N,K);
      
        System.out.println(S.length()); 
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
		String S = Integer.toString(N,K);
      
        System.out.println(S.length()); 
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
		String S = Integer.toString(N,K);
      
        System.out.println(S.length()); 
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
		String S = Integer.toString(N,K);
      
        System.out.println(S.length()); 
    } 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 String S = Integer.toString(N,K); S Integer.toString(N,K) Integer.toString Integer N K 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 sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
		String S = Integer.toString(N,K);
      
        System.out.println(S.length()); 
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
		String S = Integer.toString(N,K);
      
        System.out.println(S.length()); 
    }
} Main
import java.util.*;

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