    import java.util.*;
     
    public class Main {
    	public static void main(String[] args) {
            Scanner scan = new Scanner(System.in);
            String[] str = scan.nextLine().split(" ");
    		String value = Integer.toString(new Integer(str[0]),new Integer(str[1]));
    		System.out.println(value.length()); //output = 1e
        }
    } import java.util.*; util.* java public class Main {
    	public static void main(String[] args) {
            Scanner scan = new Scanner(System.in);
            String[] str = scan.nextLine().split(" ");
    		String value = Integer.toString(new Integer(str[0]),new Integer(str[1]));
    		System.out.println(value.length()); //output = 1e
        }
    } Main public static void main(String[] args) {
            Scanner scan = new Scanner(System.in);
            String[] str = scan.nextLine().split(" ");
    		String value = Integer.toString(new Integer(str[0]),new Integer(str[1]));
    		System.out.println(value.length()); //output = 1e
        } main {
            Scanner scan = new Scanner(System.in);
            String[] str = scan.nextLine().split(" ");
    		String value = Integer.toString(new Integer(str[0]),new Integer(str[1]));
    		System.out.println(value.length()); //output = 1e
        } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String[] str = scan.nextLine().split(" "); str scan.nextLine().split(" ") scan.nextLine().split scan.nextLine() scan.nextLine scan " " String value = Integer.toString(new Integer(str[0]),new Integer(str[1])); value Integer.toString(new Integer(str[0]),new Integer(str[1])) Integer.toString Integer new Integer(str[0]) new Integer(str[1]) System.out.println(value.length()) System.out.println System.out System System.out value.length() value.length value String[] args args public class Main {
    	public static void main(String[] args) {
            Scanner scan = new Scanner(System.in);
            String[] str = scan.nextLine().split(" ");
    		String value = Integer.toString(new Integer(str[0]),new Integer(str[1]));
    		System.out.println(value.length()); //output = 1e
        }
    } public class Main {
    	public static void main(String[] args) {
            Scanner scan = new Scanner(System.in);
            String[] str = scan.nextLine().split(" ");
    		String value = Integer.toString(new Integer(str[0]),new Integer(str[1]));
    		System.out.println(value.length()); //output = 1e
        }
    } Main
    import java.util.*;
     
    public class Main {
    	public static void main(String[] args) {
            Scanner scan = new Scanner(System.in);
            String[] str = scan.nextLine().split(" ");
    		String value = Integer.toString(new Integer(str[0]),new Integer(str[1]));
    		System.out.println(value.length()); //output = 1e
        }
    }