import java.util.Scanner;

class Main {
    static Scanner sc;
    public static void main(final String[] args) {

        sc = new Scanner(System.in);
        final int N = parseInt();
        final int K = parseInt();

        System.out.println(findBaseK(N, K));

    }

    public static int findBaseK(int n, final int k) {
        if(n==0) return 1;

        int i = 0;
        while(n!=0){
            n = Math.floorDiv(n, k);
            i++;
        }


        return i;
    }

    public static int parseInt(){
        return Integer.parseInt(sc.next());
    }
} import java.util.Scanner; Scanner java.util class Main {
    static Scanner sc;
    public static void main(final String[] args) {

        sc = new Scanner(System.in);
        final int N = parseInt();
        final int K = parseInt();

        System.out.println(findBaseK(N, K));

    }

    public static int findBaseK(int n, final int k) {
        if(n==0) return 1;

        int i = 0;
        while(n!=0){
            n = Math.floorDiv(n, k);
            i++;
        }


        return i;
    }

    public static int parseInt(){
        return Integer.parseInt(sc.next());
    }
} Main static Scanner sc; sc public static void main(final String[] args) {

        sc = new Scanner(System.in);
        final int N = parseInt();
        final int K = parseInt();

        System.out.println(findBaseK(N, K));

    } main {

        sc = new Scanner(System.in);
        final int N = parseInt();
        final int K = parseInt();

        System.out.println(findBaseK(N, K));

    } sc = new Scanner(System.in) sc new Scanner(System.in) final int N = parseInt(); N parseInt() parseInt final int K = parseInt(); K parseInt() parseInt System.out.println(findBaseK(N, K)) System.out.println System.out System System.out findBaseK(N, K) findBaseK N K final String[] args args public static int findBaseK(int n, final int k) {
        if(n==0) return 1;

        int i = 0;
        while(n!=0){
            n = Math.floorDiv(n, k);
            i++;
        }


        return i;
    } findBaseK {
        if(n==0) return 1;

        int i = 0;
        while(n!=0){
            n = Math.floorDiv(n, k);
            i++;
        }


        return i;
    } if(n==0) return 1; n==0 n 0 return 1; 1 int i = 0; i 0 while(n!=0){
            n = Math.floorDiv(n, k);
            i++;
        } n!=0 n 0 {
            n = Math.floorDiv(n, k);
            i++;
        } n = Math.floorDiv(n, k) n Math.floorDiv(n, k) Math.floorDiv Math n k i++ i return i; i int n n final int k k public static int parseInt(){
        return Integer.parseInt(sc.next());
    } parseInt {
        return Integer.parseInt(sc.next());
    } return Integer.parseInt(sc.next()); Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc
import java.util.Scanner;

class Main {
    static Scanner sc;
    public static void main(final String[] args) {

        sc = new Scanner(System.in);
        final int N = parseInt();
        final int K = parseInt();

        System.out.println(findBaseK(N, K));

    }

    public static int findBaseK(int n, final int k) {
        if(n==0) return 1;

        int i = 0;
        while(n!=0){
            n = Math.floorDiv(n, k);
            i++;
        }


        return i;
    }

    public static int parseInt(){
        return Integer.parseInt(sc.next());
    }
}