import java.util.Scanner;

class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		long num = scanner.nextInt();
		long rate = scanner.nextInt();
		int count = 0;
		while(num != 0) {
			num /= rate;
			count++;
		}
		System.out.println(count);
	}

} import java.util.Scanner; Scanner java.util class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		long num = scanner.nextInt();
		long rate = scanner.nextInt();
		int count = 0;
		while(num != 0) {
			num /= rate;
			count++;
		}
		System.out.println(count);
	}

} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		long num = scanner.nextInt();
		long rate = scanner.nextInt();
		int count = 0;
		while(num != 0) {
			num /= rate;
			count++;
		}
		System.out.println(count);
	} main {
		Scanner scanner = new Scanner(System.in);
		long num = scanner.nextInt();
		long rate = scanner.nextInt();
		int count = 0;
		while(num != 0) {
			num /= rate;
			count++;
		}
		System.out.println(count);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) long num = scanner.nextInt(); num scanner.nextInt() scanner.nextInt scanner long rate = scanner.nextInt(); rate scanner.nextInt() scanner.nextInt scanner int count = 0; count 0 while(num != 0) {
			num /= rate;
			count++;
		} num != 0 num 0 {
			num /= rate;
			count++;
		} num /= rate num rate count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args
import java.util.Scanner;

class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		long num = scanner.nextInt();
		long rate = scanner.nextInt();
		int count = 0;
		while(num != 0) {
			num /= rate;
			count++;
		}
		System.out.println(count);
	}

}
