import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int K = scan.nextInt();

		String sn = Integer.toString(N,K);
		System.out.println(sn.length());


	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int K = scan.nextInt();

		String sn = Integer.toString(N,K);
		System.out.println(sn.length());


	}
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int K = scan.nextInt();

		String sn = Integer.toString(N,K);
		System.out.println(sn.length());


	} main {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int K = scan.nextInt();

		String sn = Integer.toString(N,K);
		System.out.println(sn.length());


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

		String sn = Integer.toString(N,K);
		System.out.println(sn.length());


	}
} public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int K = scan.nextInt();

		String sn = Integer.toString(N,K);
		System.out.println(sn.length());


	}
} Main
import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int K = scan.nextInt();

		String sn = Integer.toString(N,K);
		System.out.println(sn.length());


	}
}