import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;

public class Main {
    public static void main(String args[]) {
        Scanner scanner = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        String input = scanner.nextLine();
        String[] numbers = input.split(" ");

        int num = Integer.parseInt(numbers[0]);
        int base = Integer.parseInt(numbers[1]);

        double answer = Math.ceil(Math.log((double) num)/Math.log(base));

        if (Math.log((double) num)/Math.log(base) == (int) Math.log((double) num)/Math.log(base)) {
            System.out.println((int)answer + 1);
        } else {
            System.out.println((int)answer);
        }

    }

} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.*; util.* java public class Main {
    public static void main(String args[]) {
        Scanner scanner = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        String input = scanner.nextLine();
        String[] numbers = input.split(" ");

        int num = Integer.parseInt(numbers[0]);
        int base = Integer.parseInt(numbers[1]);

        double answer = Math.ceil(Math.log((double) num)/Math.log(base));

        if (Math.log((double) num)/Math.log(base) == (int) Math.log((double) num)/Math.log(base)) {
            System.out.println((int)answer + 1);
        } else {
            System.out.println((int)answer);
        }

    }

} Main public static void main(String args[]) {
        Scanner scanner = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        String input = scanner.nextLine();
        String[] numbers = input.split(" ");

        int num = Integer.parseInt(numbers[0]);
        int base = Integer.parseInt(numbers[1]);

        double answer = Math.ceil(Math.log((double) num)/Math.log(base));

        if (Math.log((double) num)/Math.log(base) == (int) Math.log((double) num)/Math.log(base)) {
            System.out.println((int)answer + 1);
        } else {
            System.out.println((int)answer);
        }

    } main {
        Scanner scanner = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        String input = scanner.nextLine();
        String[] numbers = input.split(" ");

        int num = Integer.parseInt(numbers[0]);
        int base = Integer.parseInt(numbers[1]);

        double answer = Math.ceil(Math.log((double) num)/Math.log(base));

        if (Math.log((double) num)/Math.log(base) == (int) Math.log((double) num)/Math.log(base)) {
            System.out.println((int)answer + 1);
        } else {
            System.out.println((int)answer);
        }

    } Scanner scanner = new Scanner(new BufferedReader(new InputStreamReader(System.in))); scanner new Scanner(new BufferedReader(new InputStreamReader(System.in))) String input = scanner.nextLine(); input scanner.nextLine() scanner.nextLine scanner String[] numbers = input.split(" "); numbers input.split(" ") input.split input " " int num = Integer.parseInt(numbers[0]); num Integer.parseInt(numbers[0]) Integer.parseInt Integer numbers[0] numbers 0 int base = Integer.parseInt(numbers[1]); base Integer.parseInt(numbers[1]) Integer.parseInt Integer numbers[1] numbers 1 double answer = Math.ceil(Math.log((double) num)/Math.log(base)); answer Math.ceil(Math.log((double) num)/Math.log(base)) Math.ceil Math Math.log((double) num)/Math.log(base) Math.log((double) num) Math.log Math (double) num Math.log(base) Math.log Math base if (Math.log((double) num)/Math.log(base) == (int) Math.log((double) num)/Math.log(base)) {
            System.out.println((int)answer + 1);
        } else {
            System.out.println((int)answer);
        } Math.log((double) num)/Math.log(base) == (int) Math.log((double) num)/Math.log(base) Math.log((double) num)/Math.log(base) Math.log((double) num) Math.log Math (double) num Math.log(base) Math.log Math base (int) Math.log((double) num)/Math.log(base) (int) Math.log((double) num) Math.log Math (double) num Math.log(base) Math.log Math base {
            System.out.println((int)answer + 1);
        } System.out.println((int)answer + 1) System.out.println System.out System System.out (int)answer + 1 (int)answer 1 {
            System.out.println((int)answer);
        } System.out.println((int)answer) System.out.println System.out System System.out (int)answer String args[] args public class Main {
    public static void main(String args[]) {
        Scanner scanner = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        String input = scanner.nextLine();
        String[] numbers = input.split(" ");

        int num = Integer.parseInt(numbers[0]);
        int base = Integer.parseInt(numbers[1]);

        double answer = Math.ceil(Math.log((double) num)/Math.log(base));

        if (Math.log((double) num)/Math.log(base) == (int) Math.log((double) num)/Math.log(base)) {
            System.out.println((int)answer + 1);
        } else {
            System.out.println((int)answer);
        }

    }

} public class Main {
    public static void main(String args[]) {
        Scanner scanner = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        String input = scanner.nextLine();
        String[] numbers = input.split(" ");

        int num = Integer.parseInt(numbers[0]);
        int base = Integer.parseInt(numbers[1]);

        double answer = Math.ceil(Math.log((double) num)/Math.log(base));

        if (Math.log((double) num)/Math.log(base) == (int) Math.log((double) num)/Math.log(base)) {
            System.out.println((int)answer + 1);
        } else {
            System.out.println((int)answer);
        }

    }

} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;

public class Main {
    public static void main(String args[]) {
        Scanner scanner = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        String input = scanner.nextLine();
        String[] numbers = input.split(" ");

        int num = Integer.parseInt(numbers[0]);
        int base = Integer.parseInt(numbers[1]);

        double answer = Math.ceil(Math.log((double) num)/Math.log(base));

        if (Math.log((double) num)/Math.log(base) == (int) Math.log((double) num)/Math.log(base)) {
            System.out.println((int)answer + 1);
        } else {
            System.out.println((int)answer);
        }

    }

}