import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        long n = sc.nextLong();
        int k = sc.nextInt();

        String result = Long.toString(n, k);

        System.out.println(result.length());
    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        long n = sc.nextLong();
        int k = sc.nextInt();

        String result = Long.toString(n, k);

        System.out.println(result.length());
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        long n = sc.nextLong();
        int k = sc.nextInt();

        String result = Long.toString(n, k);

        System.out.println(result.length());
    } main {
        Scanner sc = new Scanner(System.in);

        long n = sc.nextLong();
        int k = sc.nextInt();

        String result = Long.toString(n, k);

        System.out.println(result.length());
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc int k = sc.nextInt(); k sc.nextInt() sc.nextInt sc String result = Long.toString(n, k); result Long.toString(n, k) Long.toString Long n k System.out.println(result.length()) System.out.println System.out System System.out result.length() result.length result String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        long n = sc.nextLong();
        int k = sc.nextInt();

        String result = Long.toString(n, k);

        System.out.println(result.length());
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        long n = sc.nextLong();
        int k = sc.nextInt();

        String result = Long.toString(n, k);

        System.out.println(result.length());
    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        long n = sc.nextLong();
        int k = sc.nextInt();

        String result = Long.toString(n, k);

        System.out.println(result.length());
    }
}