import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int A = scan.nextInt();
        int B = scan.nextInt();
        int i = 0;
        while(true){
            if((int)Math.pow(B,i)<=A && (int)Math.pow(B,i+1)>A){
                System.out.println(i+1);
                break;
            }
            i++;
        }
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int A = scan.nextInt();
        int B = scan.nextInt();
        int i = 0;
        while(true){
            if((int)Math.pow(B,i)<=A && (int)Math.pow(B,i+1)>A){
                System.out.println(i+1);
                break;
            }
            i++;
        }
    }
} Main public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int A = scan.nextInt();
        int B = scan.nextInt();
        int i = 0;
        while(true){
            if((int)Math.pow(B,i)<=A && (int)Math.pow(B,i+1)>A){
                System.out.println(i+1);
                break;
            }
            i++;
        }
    } main {
        Scanner scan = new Scanner(System.in);
        int A = scan.nextInt();
        int B = scan.nextInt();
        int i = 0;
        while(true){
            if((int)Math.pow(B,i)<=A && (int)Math.pow(B,i+1)>A){
                System.out.println(i+1);
                break;
            }
            i++;
        }
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int A = scan.nextInt(); A scan.nextInt() scan.nextInt scan int B = scan.nextInt(); B scan.nextInt() scan.nextInt scan int i = 0; i 0 while(true){
            if((int)Math.pow(B,i)<=A && (int)Math.pow(B,i+1)>A){
                System.out.println(i+1);
                break;
            }
            i++;
        } true {
            if((int)Math.pow(B,i)<=A && (int)Math.pow(B,i+1)>A){
                System.out.println(i+1);
                break;
            }
            i++;
        } if((int)Math.pow(B,i)<=A && (int)Math.pow(B,i+1)>A){
                System.out.println(i+1);
                break;
            } (int)Math.pow(B,i)<=A && (int)Math.pow(B,i+1)>A (int)Math.pow(B,i)<=A (int)Math.pow(B,i) Math.pow Math B i A (int)Math.pow(B,i+1)>A (int)Math.pow(B,i+1) Math.pow Math B i+1 i 1 A {
                System.out.println(i+1);
                break;
            } System.out.println(i+1) System.out.println System.out System System.out i+1 i 1 break; i++ i String[] args args public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int A = scan.nextInt();
        int B = scan.nextInt();
        int i = 0;
        while(true){
            if((int)Math.pow(B,i)<=A && (int)Math.pow(B,i+1)>A){
                System.out.println(i+1);
                break;
            }
            i++;
        }
    }
} public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int A = scan.nextInt();
        int B = scan.nextInt();
        int i = 0;
        while(true){
            if((int)Math.pow(B,i)<=A && (int)Math.pow(B,i+1)>A){
                System.out.println(i+1);
                break;
            }
            i++;
        }
    }
} Main
import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int A = scan.nextInt();
        int B = scan.nextInt();
        int i = 0;
        while(true){
            if((int)Math.pow(B,i)<=A && (int)Math.pow(B,i+1)>A){
                System.out.println(i+1);
                break;
            }
            i++;
        }
    }
}
