import java.util.*; 
import java.io.*; 

public class Main {
	public static void main(String[] args) throws IOException {
       Scanner sc = new Scanner(System.in);
       int n = sc.nextInt(); 
       String str = Integer.toString(n); 
       int k = sc.nextInt(); 
       String convert = Integer.toString(Integer.parseInt(str,10),k); 
       System.out.println(convert.length());
	}
} import java.util.*; util.* java import java.io.*; io.* java public class Main {
	public static void main(String[] args) throws IOException {
       Scanner sc = new Scanner(System.in);
       int n = sc.nextInt(); 
       String str = Integer.toString(n); 
       int k = sc.nextInt(); 
       String convert = Integer.toString(Integer.parseInt(str,10),k); 
       System.out.println(convert.length());
	}
} Main public static void main(String[] args) throws IOException {
       Scanner sc = new Scanner(System.in);
       int n = sc.nextInt(); 
       String str = Integer.toString(n); 
       int k = sc.nextInt(); 
       String convert = Integer.toString(Integer.parseInt(str,10),k); 
       System.out.println(convert.length());
	} main {
       Scanner sc = new Scanner(System.in);
       int n = sc.nextInt(); 
       String str = Integer.toString(n); 
       int k = sc.nextInt(); 
       String convert = Integer.toString(Integer.parseInt(str,10),k); 
       System.out.println(convert.length());
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc String str = Integer.toString(n); str Integer.toString(n) Integer.toString Integer n int k = sc.nextInt(); k sc.nextInt() sc.nextInt sc String convert = Integer.toString(Integer.parseInt(str,10),k); convert Integer.toString(Integer.parseInt(str,10),k) Integer.toString Integer Integer.parseInt(str,10) Integer.parseInt Integer str 10 k System.out.println(convert.length()) System.out.println System.out System System.out convert.length() convert.length convert String[] args args public class Main {
	public static void main(String[] args) throws IOException {
       Scanner sc = new Scanner(System.in);
       int n = sc.nextInt(); 
       String str = Integer.toString(n); 
       int k = sc.nextInt(); 
       String convert = Integer.toString(Integer.parseInt(str,10),k); 
       System.out.println(convert.length());
	}
} public class Main {
	public static void main(String[] args) throws IOException {
       Scanner sc = new Scanner(System.in);
       int n = sc.nextInt(); 
       String str = Integer.toString(n); 
       int k = sc.nextInt(); 
       String convert = Integer.toString(Integer.parseInt(str,10),k); 
       System.out.println(convert.length());
	}
} Main
import java.util.*; 
import java.io.*; 

public class Main {
	public static void main(String[] args) throws IOException {
       Scanner sc = new Scanner(System.in);
       int n = sc.nextInt(); 
       String str = Integer.toString(n); 
       int k = sc.nextInt(); 
       String convert = Integer.toString(Integer.parseInt(str,10),k); 
       System.out.println(convert.length());
	}
}