
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Collections;
import java.util.Scanner;
import java.util.TreeSet;

public class Main{
       
	public static void main(String[] args) {
		Scanner sdf = new Scanner(System.in);
		
                int t=1;
                while(t-->0){
                    int n=sdf.nextInt();
                    int k=sdf.nextInt();
                    if(n>1){
                    System.out.println((int)Math.ceil(Math.log(n)/Math.log(k)));
                    }
                    else System.out.println("1");
                    
                
                }                
        }
   


} import java.io.DataInputStream; DataInputStream java.io import java.io.FileInputStream; FileInputStream java.io import java.io.IOException; IOException java.io import java.util.Collections; Collections java.util import java.util.Scanner; Scanner java.util import java.util.TreeSet; TreeSet java.util public class Main{
       
	public static void main(String[] args) {
		Scanner sdf = new Scanner(System.in);
		
                int t=1;
                while(t-->0){
                    int n=sdf.nextInt();
                    int k=sdf.nextInt();
                    if(n>1){
                    System.out.println((int)Math.ceil(Math.log(n)/Math.log(k)));
                    }
                    else System.out.println("1");
                    
                
                }                
        }
   


} Main public static void main(String[] args) {
		Scanner sdf = new Scanner(System.in);
		
                int t=1;
                while(t-->0){
                    int n=sdf.nextInt();
                    int k=sdf.nextInt();
                    if(n>1){
                    System.out.println((int)Math.ceil(Math.log(n)/Math.log(k)));
                    }
                    else System.out.println("1");
                    
                
                }                
        } main {
		Scanner sdf = new Scanner(System.in);
		
                int t=1;
                while(t-->0){
                    int n=sdf.nextInt();
                    int k=sdf.nextInt();
                    if(n>1){
                    System.out.println((int)Math.ceil(Math.log(n)/Math.log(k)));
                    }
                    else System.out.println("1");
                    
                
                }                
        } Scanner sdf = new Scanner(System.in); sdf new Scanner(System.in) int t=1; t 1 while(t-->0){
                    int n=sdf.nextInt();
                    int k=sdf.nextInt();
                    if(n>1){
                    System.out.println((int)Math.ceil(Math.log(n)/Math.log(k)));
                    }
                    else System.out.println("1");
                    
                
                } t-->0 t-- t 0 {
                    int n=sdf.nextInt();
                    int k=sdf.nextInt();
                    if(n>1){
                    System.out.println((int)Math.ceil(Math.log(n)/Math.log(k)));
                    }
                    else System.out.println("1");
                    
                
                } int n=sdf.nextInt(); n sdf.nextInt() sdf.nextInt sdf int k=sdf.nextInt(); k sdf.nextInt() sdf.nextInt sdf if(n>1){
                    System.out.println((int)Math.ceil(Math.log(n)/Math.log(k)));
                    }
                    else System.out.println("1"); n>1 n 1 {
                    System.out.println((int)Math.ceil(Math.log(n)/Math.log(k)));
                    } System.out.println((int)Math.ceil(Math.log(n)/Math.log(k))) System.out.println System.out System System.out (int)Math.ceil(Math.log(n)/Math.log(k)) Math.ceil Math Math.log(n)/Math.log(k) Math.log(n) Math.log Math n Math.log(k) Math.log Math k System.out.println("1") System.out.println System.out System System.out "1" String[] args args public class Main{
       
	public static void main(String[] args) {
		Scanner sdf = new Scanner(System.in);
		
                int t=1;
                while(t-->0){
                    int n=sdf.nextInt();
                    int k=sdf.nextInt();
                    if(n>1){
                    System.out.println((int)Math.ceil(Math.log(n)/Math.log(k)));
                    }
                    else System.out.println("1");
                    
                
                }                
        }
   


} public class Main{
       
	public static void main(String[] args) {
		Scanner sdf = new Scanner(System.in);
		
                int t=1;
                while(t-->0){
                    int n=sdf.nextInt();
                    int k=sdf.nextInt();
                    if(n>1){
                    System.out.println((int)Math.ceil(Math.log(n)/Math.log(k)));
                    }
                    else System.out.println("1");
                    
                
                }                
        }
   


} Main

import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Collections;
import java.util.Scanner;
import java.util.TreeSet;

public class Main{
       
	public static void main(String[] args) {
		Scanner sdf = new Scanner(System.in);
		
                int t=1;
                while(t-->0){
                    int n=sdf.nextInt();
                    int k=sdf.nextInt();
                    if(n>1){
                    System.out.println((int)Math.ceil(Math.log(n)/Math.log(k)));
                    }
                    else System.out.println("1");
                    
                
                }                
        }
   


}