import java.util.*;
import java.util.Map.Entry;
 
class Main {
//	 static int mod =  (int) (Math.pow(10,9)+7);
//	 static int mod = 998244353;
   public static void main(String[] args) {
	   
       Scanner sc = new Scanner(System.in);
       int N = sc.nextInt();
       int K = sc.nextInt();
//       int B = sc.nextInt();
//       String S = sc.next();
//       String T = sc.next();
//       char[] s = S.toCharArray();
//       char[] t = T.toCharArray();
       
       int ans=0;
       while(N!=0) {
    	   N=N/K;
    	   ans++;
       }
       
       System.out.println(ans);
   }
      
} import java.util.*; util.* java import java.util.Map.Entry; Entry java.util.Map class Main {
//	 static int mod =  (int) (Math.pow(10,9)+7);
//	 static int mod = 998244353;
   public static void main(String[] args) {
	   
       Scanner sc = new Scanner(System.in);
       int N = sc.nextInt();
       int K = sc.nextInt();
//       int B = sc.nextInt();
//       String S = sc.next();
//       String T = sc.next();
//       char[] s = S.toCharArray();
//       char[] t = T.toCharArray();
       
       int ans=0;
       while(N!=0) {
    	   N=N/K;
    	   ans++;
       }
       
       System.out.println(ans);
   }
      
} Main //	 static int mod =  (int) (Math.pow(10,9)+7);
//	 static int mod = 998244353;
   public static void main(String[] args) {
	   
       Scanner sc = new Scanner(System.in);
       int N = sc.nextInt();
       int K = sc.nextInt();
//       int B = sc.nextInt();
//       String S = sc.next();
//       String T = sc.next();
//       char[] s = S.toCharArray();
//       char[] t = T.toCharArray();
       
       int ans=0;
       while(N!=0) {
    	   N=N/K;
    	   ans++;
       }
       
       System.out.println(ans);
   } main {
	   
       Scanner sc = new Scanner(System.in);
       int N = sc.nextInt();
       int K = sc.nextInt();
//       int B = sc.nextInt();
//       String S = sc.next();
//       String T = sc.next();
//       char[] s = S.toCharArray();
//       char[] t = T.toCharArray();
       
       int ans=0;
       while(N!=0) {
    	   N=N/K;
    	   ans++;
       }
       
       System.out.println(ans);
   } 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 ans=0; ans 0 while(N!=0) {
    	   N=N/K;
    	   ans++;
       } N!=0 N 0 {
    	   N=N/K;
    	   ans++;
       } N=N/K N N/K N K ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;
import java.util.Map.Entry;
 
class Main {
//	 static int mod =  (int) (Math.pow(10,9)+7);
//	 static int mod = 998244353;
   public static void main(String[] args) {
	   
       Scanner sc = new Scanner(System.in);
       int N = sc.nextInt();
       int K = sc.nextInt();
//       int B = sc.nextInt();
//       String S = sc.next();
//       String T = sc.next();
//       char[] s = S.toCharArray();
//       char[] t = T.toCharArray();
       
       int ans=0;
       while(N!=0) {
    	   N=N/K;
    	   ans++;
       }
       
       System.out.println(ans);
   }
      
}