import java.util.Scanner;

public 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());
		sc.close();

		int ans = 0;
		for(int i = 0; i < Math.pow(10, 9); i++) {
			double check = Math.pow(K, i);
			int num = (int) check;
			if(N > num) {
				continue;
			}else if(N == num) {
				ans = i + 1;
				break;
			}else {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	}

} import java.util.Scanner; Scanner java.util public 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());
		sc.close();

		int ans = 0;
		for(int i = 0; i < Math.pow(10, 9); i++) {
			double check = Math.pow(K, i);
			int num = (int) check;
			if(N > num) {
				continue;
			}else if(N == num) {
				ans = i + 1;
				break;
			}else {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	}

} 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());
		sc.close();

		int ans = 0;
		for(int i = 0; i < Math.pow(10, 9); i++) {
			double check = Math.pow(K, i);
			int num = (int) check;
			if(N > num) {
				continue;
			}else if(N == num) {
				ans = i + 1;
				break;
			}else {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int K = Integer.parseInt(sc.next());
		sc.close();

		int ans = 0;
		for(int i = 0; i < Math.pow(10, 9); i++) {
			double check = Math.pow(K, i);
			int num = (int) check;
			if(N > num) {
				continue;
			}else if(N == num) {
				ans = i + 1;
				break;
			}else {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	} 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 sc.close() sc.close sc int ans = 0; ans 0 for(int i = 0; i < Math.pow(10, 9); i++) {
			double check = Math.pow(K, i);
			int num = (int) check;
			if(N > num) {
				continue;
			}else if(N == num) {
				ans = i + 1;
				break;
			}else {
				ans = i;
				break;
			}
		} int i = 0; int i = 0; i 0 i < Math.pow(10, 9) i Math.pow(10, 9) Math.pow Math 10 9 i++ i++ i {
			double check = Math.pow(K, i);
			int num = (int) check;
			if(N > num) {
				continue;
			}else if(N == num) {
				ans = i + 1;
				break;
			}else {
				ans = i;
				break;
			}
		} {
			double check = Math.pow(K, i);
			int num = (int) check;
			if(N > num) {
				continue;
			}else if(N == num) {
				ans = i + 1;
				break;
			}else {
				ans = i;
				break;
			}
		} double check = Math.pow(K, i); check Math.pow(K, i) Math.pow Math K i int num = (int) check; num (int) check if(N > num) {
				continue;
			}else if(N == num) {
				ans = i + 1;
				break;
			}else {
				ans = i;
				break;
			} N > num N num {
				continue;
			} continue; if(N == num) {
				ans = i + 1;
				break;
			}else {
				ans = i;
				break;
			} N == num N num {
				ans = i + 1;
				break;
			} ans = i + 1 ans i + 1 i 1 break; {
				ans = i;
				break;
			} ans = i ans i break; System.out.println(ans) System.out.println System.out System System.out ans String[] args args public 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());
		sc.close();

		int ans = 0;
		for(int i = 0; i < Math.pow(10, 9); i++) {
			double check = Math.pow(K, i);
			int num = (int) check;
			if(N > num) {
				continue;
			}else if(N == num) {
				ans = i + 1;
				break;
			}else {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	}

} public 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());
		sc.close();

		int ans = 0;
		for(int i = 0; i < Math.pow(10, 9); i++) {
			double check = Math.pow(K, i);
			int num = (int) check;
			if(N > num) {
				continue;
			}else if(N == num) {
				ans = i + 1;
				break;
			}else {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	}

} Main
import java.util.Scanner;

public 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());
		sc.close();

		int ans = 0;
		for(int i = 0; i < Math.pow(10, 9); i++) {
			double check = Math.pow(K, i);
			int num = (int) check;
			if(N > num) {
				continue;
			}else if(N == num) {
				ans = i + 1;
				break;
			}else {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	}

}
