import java.io.*;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] arr = reader.readLine().split(" ");
        int N = Integer.parseInt(arr[0]);
        int K = Integer.parseInt(arr[1]);
        int cnt = 1;
        while (Math.pow(K, cnt) <= N)
            cnt++;
        System.out.println(cnt);
    }
} import java.io.*; io.* java public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] arr = reader.readLine().split(" ");
        int N = Integer.parseInt(arr[0]);
        int K = Integer.parseInt(arr[1]);
        int cnt = 1;
        while (Math.pow(K, cnt) <= N)
            cnt++;
        System.out.println(cnt);
    }
} Main public static void main(String[] args) throws Exception {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] arr = reader.readLine().split(" ");
        int N = Integer.parseInt(arr[0]);
        int K = Integer.parseInt(arr[1]);
        int cnt = 1;
        while (Math.pow(K, cnt) <= N)
            cnt++;
        System.out.println(cnt);
    } main {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] arr = reader.readLine().split(" ");
        int N = Integer.parseInt(arr[0]);
        int K = Integer.parseInt(arr[1]);
        int cnt = 1;
        while (Math.pow(K, cnt) <= N)
            cnt++;
        System.out.println(cnt);
    } BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) String[] arr = reader.readLine().split(" "); arr reader.readLine().split(" ") reader.readLine().split reader.readLine() reader.readLine reader " " int N = Integer.parseInt(arr[0]); N Integer.parseInt(arr[0]) Integer.parseInt Integer arr[0] arr 0 int K = Integer.parseInt(arr[1]); K Integer.parseInt(arr[1]) Integer.parseInt Integer arr[1] arr 1 int cnt = 1; cnt 1 while (Math.pow(K, cnt) <= N)
            cnt++; Math.pow(K, cnt) <= N Math.pow(K, cnt) Math.pow Math K cnt N cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] arr = reader.readLine().split(" ");
        int N = Integer.parseInt(arr[0]);
        int K = Integer.parseInt(arr[1]);
        int cnt = 1;
        while (Math.pow(K, cnt) <= N)
            cnt++;
        System.out.println(cnt);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] arr = reader.readLine().split(" ");
        int N = Integer.parseInt(arr[0]);
        int K = Integer.parseInt(arr[1]);
        int cnt = 1;
        while (Math.pow(K, cnt) <= N)
            cnt++;
        System.out.println(cnt);
    }
} Main
import java.io.*;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] arr = reader.readLine().split(" ");
        int N = Integer.parseInt(arr[0]);
        int K = Integer.parseInt(arr[1]);
        int cnt = 1;
        while (Math.pow(K, cnt) <= N)
            cnt++;
        System.out.println(cnt);
    }
}