import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int R = sc.nextInt();
        int a = 1;
        int cnt = 0;
        do {
            a = a * R;
            cnt++;
        } while (a <= N);

        System.out.println(cnt);
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int R = sc.nextInt();
        int a = 1;
        int cnt = 0;
        do {
            a = a * R;
            cnt++;
        } while (a <= N);

        System.out.println(cnt);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int R = sc.nextInt();
        int a = 1;
        int cnt = 0;
        do {
            a = a * R;
            cnt++;
        } while (a <= N);

        System.out.println(cnt);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int R = sc.nextInt();
        int a = 1;
        int cnt = 0;
        do {
            a = a * R;
            cnt++;
        } while (a <= N);

        System.out.println(cnt);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int R = sc.nextInt(); R sc.nextInt() sc.nextInt sc int a = 1; a 1 int cnt = 0; cnt 0 do {
            a = a * R;
            cnt++;
        } while (a <= N); a <= N a N {
            a = a * R;
            cnt++;
        } a = a * R a a * R a R cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int R = sc.nextInt();
        int a = 1;
        int cnt = 0;
        do {
            a = a * R;
            cnt++;
        } while (a <= N);

        System.out.println(cnt);
    }
}
