import java.io.PrintWriter;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		long N = sc.nextLong();
		int K = sc.nextInt();
		for(int i = 0; i < 40; i++) {
			long pow = (long)Math.pow(K, i);
			if(N < pow) {
				pw.print(i);
				break;
			}
		}
		pw.close();
	}
} import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		long N = sc.nextLong();
		int K = sc.nextInt();
		for(int i = 0; i < 40; i++) {
			long pow = (long)Math.pow(K, i);
			if(N < pow) {
				pw.print(i);
				break;
			}
		}
		pw.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		long N = sc.nextLong();
		int K = sc.nextInt();
		for(int i = 0; i < 40; i++) {
			long pow = (long)Math.pow(K, i);
			if(N < pow) {
				pw.print(i);
				break;
			}
		}
		pw.close();
	} main {
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		long N = sc.nextLong();
		int K = sc.nextInt();
		for(int i = 0; i < 40; i++) {
			long pow = (long)Math.pow(K, i);
			if(N < pow) {
				pw.print(i);
				break;
			}
		}
		pw.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter pw = new PrintWriter(System.out); pw new PrintWriter(System.out) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc int K = sc.nextInt(); K sc.nextInt() sc.nextInt sc for(int i = 0; i < 40; i++) {
			long pow = (long)Math.pow(K, i);
			if(N < pow) {
				pw.print(i);
				break;
			}
		} int i = 0; int i = 0; i 0 i < 40 i 40 i++ i++ i {
			long pow = (long)Math.pow(K, i);
			if(N < pow) {
				pw.print(i);
				break;
			}
		} {
			long pow = (long)Math.pow(K, i);
			if(N < pow) {
				pw.print(i);
				break;
			}
		} long pow = (long)Math.pow(K, i); pow (long)Math.pow(K, i) Math.pow Math K i if(N < pow) {
				pw.print(i);
				break;
			} N < pow N pow {
				pw.print(i);
				break;
			} pw.print(i) pw.print pw i break; pw.close() pw.close pw String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		long N = sc.nextLong();
		int K = sc.nextInt();
		for(int i = 0; i < 40; i++) {
			long pow = (long)Math.pow(K, i);
			if(N < pow) {
				pw.print(i);
				break;
			}
		}
		pw.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		long N = sc.nextLong();
		int K = sc.nextInt();
		for(int i = 0; i < 40; i++) {
			long pow = (long)Math.pow(K, i);
			if(N < pow) {
				pw.print(i);
				break;
			}
		}
		pw.close();
	}
} Main
import java.io.PrintWriter;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		long N = sc.nextLong();
		int K = sc.nextInt();
		for(int i = 0; i < 40; i++) {
			long pow = (long)Math.pow(K, i);
			if(N < pow) {
				pw.print(i);
				break;
			}
		}
		pw.close();
	}
}