import java.util.Scanner;

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

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