import java.util.*;
import java.io.*;
public class Main  {

	public static void main(String[] args) throws Exception{
		int num = 998244353;

		// TODO Auto-generated method stub
 		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
 		PrintWriter out = new PrintWriter(System.out);
	 		StringTokenizer st = new StringTokenizer(bf.readLine());
	 		int n = Integer.parseInt(st.nextToken());
	 		int k = Integer.parseInt(st.nextToken());
	 		int count = 0;
 		while(n>0){
 			n/=k;
 			count++;
 		}
 		out.println(count);
	 		
 		out.close();
 		
 		
 		
 	}
}
 	
 
//StringJoiner sj = new StringJoiner(" "); 
//sj.add(strings)
//sj.toString() gives string of those stuff w spaces or whatever that sequence is

 		
 		
 		
 		
	

 import java.util.*; util.* java import java.io.*; io.* java public class Main  {

	public static void main(String[] args) throws Exception{
		int num = 998244353;

		// TODO Auto-generated method stub
 		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
 		PrintWriter out = new PrintWriter(System.out);
	 		StringTokenizer st = new StringTokenizer(bf.readLine());
	 		int n = Integer.parseInt(st.nextToken());
	 		int k = Integer.parseInt(st.nextToken());
	 		int count = 0;
 		while(n>0){
 			n/=k;
 			count++;
 		}
 		out.println(count);
	 		
 		out.close();
 		
 		
 		
 	}
} Main public static void main(String[] args) throws Exception{
		int num = 998244353;

		// TODO Auto-generated method stub
 		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
 		PrintWriter out = new PrintWriter(System.out);
	 		StringTokenizer st = new StringTokenizer(bf.readLine());
	 		int n = Integer.parseInt(st.nextToken());
	 		int k = Integer.parseInt(st.nextToken());
	 		int count = 0;
 		while(n>0){
 			n/=k;
 			count++;
 		}
 		out.println(count);
	 		
 		out.close();
 		
 		
 		
 	} main {
		int num = 998244353;

		// TODO Auto-generated method stub
 		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
 		PrintWriter out = new PrintWriter(System.out);
	 		StringTokenizer st = new StringTokenizer(bf.readLine());
	 		int n = Integer.parseInt(st.nextToken());
	 		int k = Integer.parseInt(st.nextToken());
	 		int count = 0;
 		while(n>0){
 			n/=k;
 			count++;
 		}
 		out.println(count);
	 		
 		out.close();
 		
 		
 		
 	} int num = 998244353; num 998244353 BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); bf new BufferedReader(new InputStreamReader(System.in)) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) StringTokenizer st = new StringTokenizer(bf.readLine()); st new StringTokenizer(bf.readLine()) int n = Integer.parseInt(st.nextToken()); n Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int k = Integer.parseInt(st.nextToken()); k Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int count = 0; count 0 while(n>0){
 			n/=k;
 			count++;
 		} n>0 n 0 {
 			n/=k;
 			count++;
 		} n/=k n k count++ count out.println(count) out.println out count out.close() out.close out String[] args args public class Main  {

	public static void main(String[] args) throws Exception{
		int num = 998244353;

		// TODO Auto-generated method stub
 		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
 		PrintWriter out = new PrintWriter(System.out);
	 		StringTokenizer st = new StringTokenizer(bf.readLine());
	 		int n = Integer.parseInt(st.nextToken());
	 		int k = Integer.parseInt(st.nextToken());
	 		int count = 0;
 		while(n>0){
 			n/=k;
 			count++;
 		}
 		out.println(count);
	 		
 		out.close();
 		
 		
 		
 	}
} public class Main  {

	public static void main(String[] args) throws Exception{
		int num = 998244353;

		// TODO Auto-generated method stub
 		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
 		PrintWriter out = new PrintWriter(System.out);
	 		StringTokenizer st = new StringTokenizer(bf.readLine());
	 		int n = Integer.parseInt(st.nextToken());
	 		int k = Integer.parseInt(st.nextToken());
	 		int count = 0;
 		while(n>0){
 			n/=k;
 			count++;
 		}
 		out.println(count);
	 		
 		out.close();
 		
 		
 		
 	}
} Main
import java.util.*;
import java.io.*;
public class Main  {

	public static void main(String[] args) throws Exception{
		int num = 998244353;

		// TODO Auto-generated method stub
 		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
 		PrintWriter out = new PrintWriter(System.out);
	 		StringTokenizer st = new StringTokenizer(bf.readLine());
	 		int n = Integer.parseInt(st.nextToken());
	 		int k = Integer.parseInt(st.nextToken());
	 		int count = 0;
 		while(n>0){
 			n/=k;
 			count++;
 		}
 		out.println(count);
	 		
 		out.close();
 		
 		
 		
 	}
}
 	
 
//StringJoiner sj = new StringJoiner(" "); 
//sj.add(strings)
//sj.toString() gives string of those stuff w spaces or whatever that sequence is

 		
 		
 		
 		
	


