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 p = 0;
        while (((int) Math.pow(k, p)) <= n) {
            p++;
        }
        System.out.println(p);
    }
} 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 p = 0;
        while (((int) Math.pow(k, p)) <= n) {
            p++;
        }
        System.out.println(p);
    }
} Main public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();

        int p = 0;
        while (((int) Math.pow(k, p)) <= n) {
            p++;
        }
        System.out.println(p);
    } main {

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();

        int p = 0;
        while (((int) Math.pow(k, p)) <= n) {
            p++;
        }
        System.out.println(p);
    } 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 p = 0; p 0 while (((int) Math.pow(k, p)) <= n) {
            p++;
        } ((int) Math.pow(k, p)) <= n ((int) Math.pow(k, p)) Math.pow Math k p n {
            p++;
        } p++ p System.out.println(p) System.out.println System.out System System.out p 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 p = 0;
        while (((int) Math.pow(k, p)) <= n) {
            p++;
        }
        System.out.println(p);
    }
} public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();

        int p = 0;
        while (((int) Math.pow(k, p)) <= n) {
            p++;
        }
        System.out.println(p);
    }
} 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 p = 0;
        while (((int) Math.pow(k, p)) <= n) {
            p++;
        }
        System.out.println(p);
    }
}