import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner kb = new Scanner(System.in);
		String n = kb.next();
		int k = kb.nextInt();
		
		String num = Integer.toString(Integer.parseInt(n,10),k);
		System.out.println(num.length());
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner kb = new Scanner(System.in);
		String n = kb.next();
		int k = kb.nextInt();
		
		String num = Integer.toString(Integer.parseInt(n,10),k);
		System.out.println(num.length());
	}
} Main public static void main(String[] args) {
		Scanner kb = new Scanner(System.in);
		String n = kb.next();
		int k = kb.nextInt();
		
		String num = Integer.toString(Integer.parseInt(n,10),k);
		System.out.println(num.length());
	} main {
		Scanner kb = new Scanner(System.in);
		String n = kb.next();
		int k = kb.nextInt();
		
		String num = Integer.toString(Integer.parseInt(n,10),k);
		System.out.println(num.length());
	} Scanner kb = new Scanner(System.in); kb new Scanner(System.in) String n = kb.next(); n kb.next() kb.next kb int k = kb.nextInt(); k kb.nextInt() kb.nextInt kb String num = Integer.toString(Integer.parseInt(n,10),k); num Integer.toString(Integer.parseInt(n,10),k) Integer.toString Integer Integer.parseInt(n,10) Integer.parseInt Integer n 10 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 kb = new Scanner(System.in);
		String n = kb.next();
		int k = kb.nextInt();
		
		String num = Integer.toString(Integer.parseInt(n,10),k);
		System.out.println(num.length());
	}
} public class Main {
	public static void main(String[] args) {
		Scanner kb = new Scanner(System.in);
		String n = kb.next();
		int k = kb.nextInt();
		
		String num = Integer.toString(Integer.parseInt(n,10),k);
		System.out.println(num.length());
	}
} Main
import java.util.*;

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