import java.util.Scanner;

/**
 * B - Digits
 * 整数 N を K 進数で表したとき、何桁になるかを求めてください。
 */
public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner( System.in );
        // 整数N
        int n = sc.nextInt();
        // 何進法か
        int k = sc.nextInt();

        if( k == 10 ) {
            System.out.println( String.valueOf( n ).length() );
        }
        else {
            String baseK = Integer.toString( n, k );
            System.out.println( String.valueOf( baseK ).length() );
        }

        sc.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner( System.in );
        // 整数N
        int n = sc.nextInt();
        // 何進法か
        int k = sc.nextInt();

        if( k == 10 ) {
            System.out.println( String.valueOf( n ).length() );
        }
        else {
            String baseK = Integer.toString( n, k );
            System.out.println( String.valueOf( baseK ).length() );
        }

        sc.close();
    }
} Main public static void main(String[] args) {

        Scanner sc = new Scanner( System.in );
        // 整数N
        int n = sc.nextInt();
        // 何進法か
        int k = sc.nextInt();

        if( k == 10 ) {
            System.out.println( String.valueOf( n ).length() );
        }
        else {
            String baseK = Integer.toString( n, k );
            System.out.println( String.valueOf( baseK ).length() );
        }

        sc.close();
    } main {

        Scanner sc = new Scanner( System.in );
        // 整数N
        int n = sc.nextInt();
        // 何進法か
        int k = sc.nextInt();

        if( k == 10 ) {
            System.out.println( String.valueOf( n ).length() );
        }
        else {
            String baseK = Integer.toString( n, k );
            System.out.println( String.valueOf( baseK ).length() );
        }

        sc.close();
    } Scanner sc = new Scanner( System.in ); sc new Scanner( System.in ) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int k = sc.nextInt(); k sc.nextInt() sc.nextInt sc if( k == 10 ) {
            System.out.println( String.valueOf( n ).length() );
        }
        else {
            String baseK = Integer.toString( n, k );
            System.out.println( String.valueOf( baseK ).length() );
        } k == 10 k 10 {
            System.out.println( String.valueOf( n ).length() );
        } System.out.println( String.valueOf( n ).length() ) System.out.println System.out System System.out String.valueOf( n ).length() String.valueOf( n ).length String.valueOf( n ) String.valueOf String n {
            String baseK = Integer.toString( n, k );
            System.out.println( String.valueOf( baseK ).length() );
        } String baseK = Integer.toString( n, k ); baseK Integer.toString( n, k ) Integer.toString Integer n k System.out.println( String.valueOf( baseK ).length() ) System.out.println System.out System System.out String.valueOf( baseK ).length() String.valueOf( baseK ).length String.valueOf( baseK ) String.valueOf String baseK sc.close() sc.close sc String[] args args public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner( System.in );
        // 整数N
        int n = sc.nextInt();
        // 何進法か
        int k = sc.nextInt();

        if( k == 10 ) {
            System.out.println( String.valueOf( n ).length() );
        }
        else {
            String baseK = Integer.toString( n, k );
            System.out.println( String.valueOf( baseK ).length() );
        }

        sc.close();
    }
} public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner( System.in );
        // 整数N
        int n = sc.nextInt();
        // 何進法か
        int k = sc.nextInt();

        if( k == 10 ) {
            System.out.println( String.valueOf( n ).length() );
        }
        else {
            String baseK = Integer.toString( n, k );
            System.out.println( String.valueOf( baseK ).length() );
        }

        sc.close();
    }
} Main
import java.util.Scanner;

/**
 * B - Digits
 * 整数 N を K 進数で表したとき、何桁になるかを求めてください。
 */
public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner( System.in );
        // 整数N
        int n = sc.nextInt();
        // 何進法か
        int k = sc.nextInt();

        if( k == 10 ) {
            System.out.println( String.valueOf( n ).length() );
        }
        else {
            String baseK = Integer.toString( n, k );
            System.out.println( String.valueOf( baseK ).length() );
        }

        sc.close();
    }
}