import java.util.*;
import java.io.PrintWriter;
import static java.lang.Integer.*;
import static java.lang.Long.*;
import static java.lang.Math.*;
import static java.lang.System.*;

public class Main {
	public static final int MOD = 1000000007;
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		long n = parseLong(sc.next());
		long k = parseLong(sc.next());
		sc.close();
		int ans = 0;
		if(k==10) {
			ans = (int) floor(log10(n)+1);
		} else {
			ans = (int) floor(log(n)/log(k)+1);
		}
		out.println(ans);
	}
} import java.util.*; util.* java import java.io.PrintWriter; PrintWriter java.io import static java.lang.Integer.*; import static java.lang.Integer.*; import static java.lang.Integer.*; import static java.lang.Long.*; import static java.lang.Long.*; import static java.lang.Long.*; import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; public class Main {
	public static final int MOD = 1000000007;
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		long n = parseLong(sc.next());
		long k = parseLong(sc.next());
		sc.close();
		int ans = 0;
		if(k==10) {
			ans = (int) floor(log10(n)+1);
		} else {
			ans = (int) floor(log(n)/log(k)+1);
		}
		out.println(ans);
	}
} Main public static final int MOD = 1000000007; MOD 1000000007 public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		long n = parseLong(sc.next());
		long k = parseLong(sc.next());
		sc.close();
		int ans = 0;
		if(k==10) {
			ans = (int) floor(log10(n)+1);
		} else {
			ans = (int) floor(log(n)/log(k)+1);
		}
		out.println(ans);
	} main {
		int i,j;
		Scanner sc = new Scanner(in);
		long n = parseLong(sc.next());
		long k = parseLong(sc.next());
		sc.close();
		int ans = 0;
		if(k==10) {
			ans = (int) floor(log10(n)+1);
		} else {
			ans = (int) floor(log(n)/log(k)+1);
		}
		out.println(ans);
	} int i i j; j Scanner sc = new Scanner(in); sc new Scanner(in) long n = parseLong(sc.next()); n parseLong(sc.next()) parseLong sc.next() sc.next sc long k = parseLong(sc.next()); k parseLong(sc.next()) parseLong sc.next() sc.next sc sc.close() sc.close sc int ans = 0; ans 0 if(k==10) {
			ans = (int) floor(log10(n)+1);
		} else {
			ans = (int) floor(log(n)/log(k)+1);
		} k==10 k 10 {
			ans = (int) floor(log10(n)+1);
		} ans = (int) floor(log10(n)+1) ans (int) floor(log10(n)+1) floor log10(n)+1 log10(n) log10 n 1 {
			ans = (int) floor(log(n)/log(k)+1);
		} ans = (int) floor(log(n)/log(k)+1) ans (int) floor(log(n)/log(k)+1) floor log(n)/log(k)+1 log(n)/log(k) log(n) log n log(k) log k 1 out.println(ans) out.println out ans String[] args args public class Main {
	public static final int MOD = 1000000007;
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		long n = parseLong(sc.next());
		long k = parseLong(sc.next());
		sc.close();
		int ans = 0;
		if(k==10) {
			ans = (int) floor(log10(n)+1);
		} else {
			ans = (int) floor(log(n)/log(k)+1);
		}
		out.println(ans);
	}
} public class Main {
	public static final int MOD = 1000000007;
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		long n = parseLong(sc.next());
		long k = parseLong(sc.next());
		sc.close();
		int ans = 0;
		if(k==10) {
			ans = (int) floor(log10(n)+1);
		} else {
			ans = (int) floor(log(n)/log(k)+1);
		}
		out.println(ans);
	}
} Main
import java.util.*;
import java.io.PrintWriter;
import static java.lang.Integer.*;
import static java.lang.Long.*;
import static java.lang.Math.*;
import static java.lang.System.*;

public class Main {
	public static final int MOD = 1000000007;
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		long n = parseLong(sc.next());
		long k = parseLong(sc.next());
		sc.close();
		int ans = 0;
		if(k==10) {
			ans = (int) floor(log10(n)+1);
		} else {
			ans = (int) floor(log(n)/log(k)+1);
		}
		out.println(ans);
	}
}
