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 num = "";
  	while(N>0){
		num = num + N%K;
      	N = (int) N/K;
      	//System.out.println("N:" + N);
      	//System.out.println("num:" + num);
    }

	System.out.println(num.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 num = "";
  	while(N>0){
		num = num + N%K;
      	N = (int) N/K;
      	//System.out.println("N:" + N);
      	//System.out.println("num:" + num);
    }

	System.out.println(num.length());
}
} Main public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
  	int N = sc.nextInt();
  	int K = sc.nextInt();
  	String num = "";
  	while(N>0){
		num = num + N%K;
      	N = (int) N/K;
      	//System.out.println("N:" + N);
      	//System.out.println("num:" + num);
    }

	System.out.println(num.length());
} main {
	Scanner sc = new Scanner(System.in);
  	int N = sc.nextInt();
  	int K = sc.nextInt();
  	String num = "";
  	while(N>0){
		num = num + N%K;
      	N = (int) N/K;
      	//System.out.println("N:" + N);
      	//System.out.println("num:" + num);
    }

	System.out.println(num.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 num = ""; num "" while(N>0){
		num = num + N%K;
      	N = (int) N/K;
      	//System.out.println("N:" + N);
      	//System.out.println("num:" + num);
    } N>0 N 0 {
		num = num + N%K;
      	N = (int) N/K;
      	//System.out.println("N:" + N);
      	//System.out.println("num:" + num);
    } num = num + N%K num num + N%K num N%K N K N = (int) N/K N (int) N/K (int) N K System.out.println(num.length()) System.out.println System.out System System.out num.length() num.length num 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 num = "";
  	while(N>0){
		num = num + N%K;
      	N = (int) N/K;
      	//System.out.println("N:" + N);
      	//System.out.println("num:" + num);
    }

	System.out.println(num.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 num = "";
  	while(N>0){
		num = num + N%K;
      	N = (int) N/K;
      	//System.out.println("N:" + N);
      	//System.out.println("num:" + num);
    }

	System.out.println(num.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 num = "";
  	while(N>0){
		num = num + N%K;
      	N = (int) N/K;
      	//System.out.println("N:" + N);
      	//System.out.println("num:" + num);
    }

	System.out.println(num.length());
}
}