import java.util.Scanner;
 
public class Main {
 
	public static final MyScanner in = new MyScanner();
	public static int[][][][] memo;
 
	public static void main(String[] args) {
 
		long N = in.nextLong();
		long K = in.nextLong();
		int cnt = 1;
		N += 1;
		while(N > Math.pow(K, cnt)) cnt++;
 
		System.out.println(cnt);
 
	}
 
 
	public static class MyScanner{
		Scanner sc = new Scanner(System.in);
		String nextLine() {return sc.nextLine();}
		String next() {return sc.next();}
		int nextInt() {return Integer.valueOf(sc.next());}
		long nextLong() { return Long.valueOf(sc.next());}
	}
} import java.util.Scanner; Scanner java.util public class Main {
 
	public static final MyScanner in = new MyScanner();
	public static int[][][][] memo;
 
	public static void main(String[] args) {
 
		long N = in.nextLong();
		long K = in.nextLong();
		int cnt = 1;
		N += 1;
		while(N > Math.pow(K, cnt)) cnt++;
 
		System.out.println(cnt);
 
	}
 
 
	public static class MyScanner{
		Scanner sc = new Scanner(System.in);
		String nextLine() {return sc.nextLine();}
		String next() {return sc.next();}
		int nextInt() {return Integer.valueOf(sc.next());}
		long nextLong() { return Long.valueOf(sc.next());}
	}
} Main public static final MyScanner in = new MyScanner(); in new MyScanner() public static int[][][][] memo; memo public static void main(String[] args) {
 
		long N = in.nextLong();
		long K = in.nextLong();
		int cnt = 1;
		N += 1;
		while(N > Math.pow(K, cnt)) cnt++;
 
		System.out.println(cnt);
 
	} main {
 
		long N = in.nextLong();
		long K = in.nextLong();
		int cnt = 1;
		N += 1;
		while(N > Math.pow(K, cnt)) cnt++;
 
		System.out.println(cnt);
 
	} long N = in.nextLong(); N in.nextLong() in.nextLong in long K = in.nextLong(); K in.nextLong() in.nextLong in int cnt = 1; cnt 1 N += 1 N 1 while(N > Math.pow(K, cnt)) cnt++; N > Math.pow(K, cnt) N Math.pow(K, cnt) Math.pow Math K cnt cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public static class MyScanner{
		Scanner sc = new Scanner(System.in);
		String nextLine() {return sc.nextLine();}
		String next() {return sc.next();}
		int nextInt() {return Integer.valueOf(sc.next());}
		long nextLong() { return Long.valueOf(sc.next());}
	} MyScanner Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String nextLine() {return sc.nextLine();} nextLine {return sc.nextLine();} return sc.nextLine(); sc.nextLine() sc.nextLine sc String next() {return sc.next();} next {return sc.next();} return sc.next(); sc.next() sc.next sc int nextInt() {return Integer.valueOf(sc.next());} nextInt {return Integer.valueOf(sc.next());} return Integer.valueOf(sc.next()); Integer.valueOf(sc.next()) Integer.valueOf Integer sc.next() sc.next sc long nextLong() { return Long.valueOf(sc.next());} nextLong { return Long.valueOf(sc.next());} return Long.valueOf(sc.next()); Long.valueOf(sc.next()) Long.valueOf Long sc.next() sc.next sc public class Main {
 
	public static final MyScanner in = new MyScanner();
	public static int[][][][] memo;
 
	public static void main(String[] args) {
 
		long N = in.nextLong();
		long K = in.nextLong();
		int cnt = 1;
		N += 1;
		while(N > Math.pow(K, cnt)) cnt++;
 
		System.out.println(cnt);
 
	}
 
 
	public static class MyScanner{
		Scanner sc = new Scanner(System.in);
		String nextLine() {return sc.nextLine();}
		String next() {return sc.next();}
		int nextInt() {return Integer.valueOf(sc.next());}
		long nextLong() { return Long.valueOf(sc.next());}
	}
} public class Main {
 
	public static final MyScanner in = new MyScanner();
	public static int[][][][] memo;
 
	public static void main(String[] args) {
 
		long N = in.nextLong();
		long K = in.nextLong();
		int cnt = 1;
		N += 1;
		while(N > Math.pow(K, cnt)) cnt++;
 
		System.out.println(cnt);
 
	}
 
 
	public static class MyScanner{
		Scanner sc = new Scanner(System.in);
		String nextLine() {return sc.nextLine();}
		String next() {return sc.next();}
		int nextInt() {return Integer.valueOf(sc.next());}
		long nextLong() { return Long.valueOf(sc.next());}
	}
} Main
import java.util.Scanner;
 
public class Main {
 
	public static final MyScanner in = new MyScanner();
	public static int[][][][] memo;
 
	public static void main(String[] args) {
 
		long N = in.nextLong();
		long K = in.nextLong();
		int cnt = 1;
		N += 1;
		while(N > Math.pow(K, cnt)) cnt++;
 
		System.out.println(cnt);
 
	}
 
 
	public static class MyScanner{
		Scanner sc = new Scanner(System.in);
		String nextLine() {return sc.nextLine();}
		String next() {return sc.next();}
		int nextInt() {return Integer.valueOf(sc.next());}
		long nextLong() { return Long.valueOf(sc.next());}
	}
}