import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int K = scanner.nextInt();

        String temp = Integer.toString(N);
        String answer = Integer.toString(Integer.parseInt(temp, 10), K);
        System.out.println(answer.length());
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int K = scanner.nextInt();

        String temp = Integer.toString(N);
        String answer = Integer.toString(Integer.parseInt(temp, 10), K);
        System.out.println(answer.length());
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int K = scanner.nextInt();

        String temp = Integer.toString(N);
        String answer = Integer.toString(Integer.parseInt(temp, 10), K);
        System.out.println(answer.length());
    } main {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int K = scanner.nextInt();

        String temp = Integer.toString(N);
        String answer = Integer.toString(Integer.parseInt(temp, 10), K);
        System.out.println(answer.length());
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int K = scanner.nextInt(); K scanner.nextInt() scanner.nextInt scanner String temp = Integer.toString(N); temp Integer.toString(N) Integer.toString Integer N String answer = Integer.toString(Integer.parseInt(temp, 10), K); answer Integer.toString(Integer.parseInt(temp, 10), K) Integer.toString Integer Integer.parseInt(temp, 10) Integer.parseInt Integer temp 10 K System.out.println(answer.length()) System.out.println System.out System System.out answer.length() answer.length answer String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int K = scanner.nextInt();

        String temp = Integer.toString(N);
        String answer = Integer.toString(Integer.parseInt(temp, 10), K);
        System.out.println(answer.length());
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int K = scanner.nextInt();

        String temp = Integer.toString(N);
        String answer = Integer.toString(Integer.parseInt(temp, 10), K);
        System.out.println(answer.length());
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int K = scanner.nextInt();

        String temp = Integer.toString(N);
        String answer = Integer.toString(Integer.parseInt(temp, 10), K);
        System.out.println(answer.length());
    }
}