import java.util.Scanner;

public class Main {
	
	public static void main(String[] args) {
		
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int input = scanner.nextInt();
		
		String str = new Integer(n).toString(n, input);
		System.out.println(str.length());
	}	
	
} import java.util.Scanner; Scanner java.util public class Main {
	
	public static void main(String[] args) {
		
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int input = scanner.nextInt();
		
		String str = new Integer(n).toString(n, input);
		System.out.println(str.length());
	}	
	
} Main public static void main(String[] args) {
		
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int input = scanner.nextInt();
		
		String str = new Integer(n).toString(n, input);
		System.out.println(str.length());
	} main {
		
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int input = scanner.nextInt();
		
		String str = new Integer(n).toString(n, input);
		System.out.println(str.length());
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int input = scanner.nextInt(); input scanner.nextInt() scanner.nextInt scanner String str = new Integer(n).toString(n, input); str new Integer(n).toString(n, input) new Integer(n).toString new Integer(n) n input System.out.println(str.length()) System.out.println System.out System System.out str.length() str.length str String[] args args public class Main {
	
	public static void main(String[] args) {
		
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int input = scanner.nextInt();
		
		String str = new Integer(n).toString(n, input);
		System.out.println(str.length());
	}	
	
} public class Main {
	
	public static void main(String[] args) {
		
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int input = scanner.nextInt();
		
		String str = new Integer(n).toString(n, input);
		System.out.println(str.length());
	}	
	
} Main
import java.util.Scanner;

public class Main {
	
	public static void main(String[] args) {
		
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int input = scanner.nextInt();
		
		String str = new Integer(n).toString(n, input);
		System.out.println(str.length());
	}	
	
}