import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {

        // 入力されたデータの準備
        Scanner scanner = new Scanner(System.in);
        String inputData = scanner.nextLine();
        String[] editedInputData = inputData.split(" ");
        long checkNum = Long.parseLong(editedInputData[0]);
        double baseNum = Integer.parseInt(editedInputData[1]);
        scanner.close();

        // 判定
        double exponentCount = 1;
    
        while (true) {
            double exponentNum = Math.pow(baseNum, exponentCount);
            if (checkNum < exponentNum) {
                break;
            }
            exponentCount++;
        }

        long count = (long)exponentCount;

        System.out.println(count);

    }

} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) throws Exception {

        // 入力されたデータの準備
        Scanner scanner = new Scanner(System.in);
        String inputData = scanner.nextLine();
        String[] editedInputData = inputData.split(" ");
        long checkNum = Long.parseLong(editedInputData[0]);
        double baseNum = Integer.parseInt(editedInputData[1]);
        scanner.close();

        // 判定
        double exponentCount = 1;
    
        while (true) {
            double exponentNum = Math.pow(baseNum, exponentCount);
            if (checkNum < exponentNum) {
                break;
            }
            exponentCount++;
        }

        long count = (long)exponentCount;

        System.out.println(count);

    }

} Main public static void main(String[] args) throws Exception {

        // 入力されたデータの準備
        Scanner scanner = new Scanner(System.in);
        String inputData = scanner.nextLine();
        String[] editedInputData = inputData.split(" ");
        long checkNum = Long.parseLong(editedInputData[0]);
        double baseNum = Integer.parseInt(editedInputData[1]);
        scanner.close();

        // 判定
        double exponentCount = 1;
    
        while (true) {
            double exponentNum = Math.pow(baseNum, exponentCount);
            if (checkNum < exponentNum) {
                break;
            }
            exponentCount++;
        }

        long count = (long)exponentCount;

        System.out.println(count);

    } main {

        // 入力されたデータの準備
        Scanner scanner = new Scanner(System.in);
        String inputData = scanner.nextLine();
        String[] editedInputData = inputData.split(" ");
        long checkNum = Long.parseLong(editedInputData[0]);
        double baseNum = Integer.parseInt(editedInputData[1]);
        scanner.close();

        // 判定
        double exponentCount = 1;
    
        while (true) {
            double exponentNum = Math.pow(baseNum, exponentCount);
            if (checkNum < exponentNum) {
                break;
            }
            exponentCount++;
        }

        long count = (long)exponentCount;

        System.out.println(count);

    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String inputData = scanner.nextLine(); inputData scanner.nextLine() scanner.nextLine scanner String[] editedInputData = inputData.split(" "); editedInputData inputData.split(" ") inputData.split inputData " " long checkNum = Long.parseLong(editedInputData[0]); checkNum Long.parseLong(editedInputData[0]) Long.parseLong Long editedInputData[0] editedInputData 0 double baseNum = Integer.parseInt(editedInputData[1]); baseNum Integer.parseInt(editedInputData[1]) Integer.parseInt Integer editedInputData[1] editedInputData 1 scanner.close() scanner.close scanner double exponentCount = 1; exponentCount 1 while (true) {
            double exponentNum = Math.pow(baseNum, exponentCount);
            if (checkNum < exponentNum) {
                break;
            }
            exponentCount++;
        } true {
            double exponentNum = Math.pow(baseNum, exponentCount);
            if (checkNum < exponentNum) {
                break;
            }
            exponentCount++;
        } double exponentNum = Math.pow(baseNum, exponentCount); exponentNum Math.pow(baseNum, exponentCount) Math.pow Math baseNum exponentCount if (checkNum < exponentNum) {
                break;
            } checkNum < exponentNum checkNum exponentNum {
                break;
            } break; exponentCount++ exponentCount long count = (long)exponentCount; count (long)exponentCount System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
    public static void main(String[] args) throws Exception {

        // 入力されたデータの準備
        Scanner scanner = new Scanner(System.in);
        String inputData = scanner.nextLine();
        String[] editedInputData = inputData.split(" ");
        long checkNum = Long.parseLong(editedInputData[0]);
        double baseNum = Integer.parseInt(editedInputData[1]);
        scanner.close();

        // 判定
        double exponentCount = 1;
    
        while (true) {
            double exponentNum = Math.pow(baseNum, exponentCount);
            if (checkNum < exponentNum) {
                break;
            }
            exponentCount++;
        }

        long count = (long)exponentCount;

        System.out.println(count);

    }

} public class Main {
    public static void main(String[] args) throws Exception {

        // 入力されたデータの準備
        Scanner scanner = new Scanner(System.in);
        String inputData = scanner.nextLine();
        String[] editedInputData = inputData.split(" ");
        long checkNum = Long.parseLong(editedInputData[0]);
        double baseNum = Integer.parseInt(editedInputData[1]);
        scanner.close();

        // 判定
        double exponentCount = 1;
    
        while (true) {
            double exponentNum = Math.pow(baseNum, exponentCount);
            if (checkNum < exponentNum) {
                break;
            }
            exponentCount++;
        }

        long count = (long)exponentCount;

        System.out.println(count);

    }

} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {

        // 入力されたデータの準備
        Scanner scanner = new Scanner(System.in);
        String inputData = scanner.nextLine();
        String[] editedInputData = inputData.split(" ");
        long checkNum = Long.parseLong(editedInputData[0]);
        double baseNum = Integer.parseInt(editedInputData[1]);
        scanner.close();

        // 判定
        double exponentCount = 1;
    
        while (true) {
            double exponentNum = Math.pow(baseNum, exponentCount);
            if (checkNum < exponentNum) {
                break;
            }
            exponentCount++;
        }

        long count = (long)exponentCount;

        System.out.println(count);

    }

}