import java.util.Scanner;

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

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