import java.util.Scanner;

class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int N = Integer.parseInt(sc.next());
		int K = Integer.parseInt(sc.next());

		String nn = Integer.toString(N, K);
		System.out.println(nn.length());

	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int N = Integer.parseInt(sc.next());
		int K = Integer.parseInt(sc.next());

		String nn = Integer.toString(N, K);
		System.out.println(nn.length());

	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int N = Integer.parseInt(sc.next());
		int K = Integer.parseInt(sc.next());

		String nn = Integer.toString(N, K);
		System.out.println(nn.length());

	} main {

		Scanner sc = new Scanner(System.in);

		int N = Integer.parseInt(sc.next());
		int K = Integer.parseInt(sc.next());

		String nn = Integer.toString(N, K);
		System.out.println(nn.length());

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int K = Integer.parseInt(sc.next()); K Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc String nn = Integer.toString(N, K); nn Integer.toString(N, K) Integer.toString Integer N K System.out.println(nn.length()) System.out.println System.out System System.out nn.length() nn.length nn String[] args args
import java.util.Scanner;

class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int N = Integer.parseInt(sc.next());
		int K = Integer.parseInt(sc.next());

		String nn = Integer.toString(N, K);
		System.out.println(nn.length());

	}
}
