import java.util.Scanner;
 

//result = Math.pow(num1, num3)
//StringBuffer str = new StringBuffer(hoge1);
//String hoge2 = str.reverse().toString();
public class Main {
	private static Scanner sc = new Scanner(System.in);
	static void p(String ans) {System.out.println(ans);};
	static void p(int ans) {System.out.println(ans);};
	static void p(long ans) {System.out.println(ans);};
	//static String eikomoji[]={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
	
	
	public static void main(String[] args) {
	long N =sc.nextInt();
	long R =sc.nextInt();
	long g=0;
	boolean a=true;
		for(int d=0;a;d++) {
			g+=(long)Math.pow(R, d)*(R-1);
			if(g>=N) {
					p(d+1);
					a=false;
				}
			
		}
		
		
	}
} import java.util.Scanner; Scanner java.util public class Main {
	private static Scanner sc = new Scanner(System.in);
	static void p(String ans) {System.out.println(ans);};
	static void p(int ans) {System.out.println(ans);};
	static void p(long ans) {System.out.println(ans);};
	//static String eikomoji[]={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
	
	
	public static void main(String[] args) {
	long N =sc.nextInt();
	long R =sc.nextInt();
	long g=0;
	boolean a=true;
		for(int d=0;a;d++) {
			g+=(long)Math.pow(R, d)*(R-1);
			if(g>=N) {
					p(d+1);
					a=false;
				}
			
		}
		
		
	}
} Main private static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) static void p(String ans) {System.out.println(ans);} p {System.out.println(ans);} System.out.println(ans) System.out.println System.out System System.out ans String ans ans static void p(int ans) {System.out.println(ans);} p {System.out.println(ans);} System.out.println(ans) System.out.println System.out System System.out ans int ans ans static void p(long ans) {System.out.println(ans);} p {System.out.println(ans);} System.out.println(ans) System.out.println System.out System System.out ans long ans ans public static void main(String[] args) {
	long N =sc.nextInt();
	long R =sc.nextInt();
	long g=0;
	boolean a=true;
		for(int d=0;a;d++) {
			g+=(long)Math.pow(R, d)*(R-1);
			if(g>=N) {
					p(d+1);
					a=false;
				}
			
		}
		
		
	} main {
	long N =sc.nextInt();
	long R =sc.nextInt();
	long g=0;
	boolean a=true;
		for(int d=0;a;d++) {
			g+=(long)Math.pow(R, d)*(R-1);
			if(g>=N) {
					p(d+1);
					a=false;
				}
			
		}
		
		
	} long N =sc.nextInt(); N sc.nextInt() sc.nextInt sc long R =sc.nextInt(); R sc.nextInt() sc.nextInt sc long g=0; g 0 boolean a=true; a true for(int d=0;a;d++) {
			g+=(long)Math.pow(R, d)*(R-1);
			if(g>=N) {
					p(d+1);
					a=false;
				}
			
		} int d=0; int d=0; d 0 a d++ d++ d {
			g+=(long)Math.pow(R, d)*(R-1);
			if(g>=N) {
					p(d+1);
					a=false;
				}
			
		} {
			g+=(long)Math.pow(R, d)*(R-1);
			if(g>=N) {
					p(d+1);
					a=false;
				}
			
		} g+=(long)Math.pow(R, d)*(R-1) g (long)Math.pow(R, d)*(R-1) (long)Math.pow(R, d) Math.pow Math R d (R-1) R 1 if(g>=N) {
					p(d+1);
					a=false;
				} g>=N g N {
					p(d+1);
					a=false;
				} p(d+1) p d+1 d 1 a=false a false String[] args args public class Main {
	private static Scanner sc = new Scanner(System.in);
	static void p(String ans) {System.out.println(ans);};
	static void p(int ans) {System.out.println(ans);};
	static void p(long ans) {System.out.println(ans);};
	//static String eikomoji[]={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
	
	
	public static void main(String[] args) {
	long N =sc.nextInt();
	long R =sc.nextInt();
	long g=0;
	boolean a=true;
		for(int d=0;a;d++) {
			g+=(long)Math.pow(R, d)*(R-1);
			if(g>=N) {
					p(d+1);
					a=false;
				}
			
		}
		
		
	}
} public class Main {
	private static Scanner sc = new Scanner(System.in);
	static void p(String ans) {System.out.println(ans);};
	static void p(int ans) {System.out.println(ans);};
	static void p(long ans) {System.out.println(ans);};
	//static String eikomoji[]={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
	
	
	public static void main(String[] args) {
	long N =sc.nextInt();
	long R =sc.nextInt();
	long g=0;
	boolean a=true;
		for(int d=0;a;d++) {
			g+=(long)Math.pow(R, d)*(R-1);
			if(g>=N) {
					p(d+1);
					a=false;
				}
			
		}
		
		
	}
} Main
import java.util.Scanner;
 

//result = Math.pow(num1, num3)
//StringBuffer str = new StringBuffer(hoge1);
//String hoge2 = str.reverse().toString();
public class Main {
	private static Scanner sc = new Scanner(System.in);
	static void p(String ans) {System.out.println(ans);};
	static void p(int ans) {System.out.println(ans);};
	static void p(long ans) {System.out.println(ans);};
	//static String eikomoji[]={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
	
	
	public static void main(String[] args) {
	long N =sc.nextInt();
	long R =sc.nextInt();
	long g=0;
	boolean a=true;
		for(int d=0;a;d++) {
			g+=(long)Math.pow(R, d)*(R-1);
			if(g>=N) {
					p(d+1);
					a=false;
				}
			
		}
		
		
	}
}