import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int K = scanner.nextInt();
        int num = 0;
        
        for(int i=0; i<=N; i++){
            
            if(N < Math.pow(K,i)){
                    System.out.println(i);    
                    break;
                }
                
        }
        
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int K = scanner.nextInt();
        int num = 0;
        
        for(int i=0; i<=N; i++){
            
            if(N < Math.pow(K,i)){
                    System.out.println(i);    
                    break;
                }
                
        }
        
    }
} Main public static void main(String[] args) throws Exception {
        
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int K = scanner.nextInt();
        int num = 0;
        
        for(int i=0; i<=N; i++){
            
            if(N < Math.pow(K,i)){
                    System.out.println(i);    
                    break;
                }
                
        }
        
    } main {
        
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int K = scanner.nextInt();
        int num = 0;
        
        for(int i=0; i<=N; i++){
            
            if(N < Math.pow(K,i)){
                    System.out.println(i);    
                    break;
                }
                
        }
        
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int K = scanner.nextInt(); K scanner.nextInt() scanner.nextInt scanner int num = 0; num 0 for(int i=0; i<=N; i++){
            
            if(N < Math.pow(K,i)){
                    System.out.println(i);    
                    break;
                }
                
        } int i=0; int i=0; i 0 i<=N i N i++ i++ i {
            
            if(N < Math.pow(K,i)){
                    System.out.println(i);    
                    break;
                }
                
        } {
            
            if(N < Math.pow(K,i)){
                    System.out.println(i);    
                    break;
                }
                
        } if(N < Math.pow(K,i)){
                    System.out.println(i);    
                    break;
                } N < Math.pow(K,i) N Math.pow(K,i) Math.pow Math K i {
                    System.out.println(i);    
                    break;
                } System.out.println(i) System.out.println System.out System System.out i break; String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int K = scanner.nextInt();
        int num = 0;
        
        for(int i=0; i<=N; i++){
            
            if(N < Math.pow(K,i)){
                    System.out.println(i);    
                    break;
                }
                
        }
        
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int K = scanner.nextInt();
        int num = 0;
        
        for(int i=0; i<=N; i++){
            
            if(N < Math.pow(K,i)){
                    System.out.println(i);    
                    break;
                }
                
        }
        
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int K = scanner.nextInt();
        int num = 0;
        
        for(int i=0; i<=N; i++){
            
            if(N < Math.pow(K,i)){
                    System.out.println(i);    
                    break;
                }
                
        }
        
    }
}
