import java.util.Scanner;

public class Main {

    public static final long MOD = 1000000007;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] params = sc.nextLine().split(" " );
        long n = Long.parseLong( params[0] );
        int k = Integer.parseInt( params[1] );



        System.out.println( Long.toString( n , k ).length() );

    }


} import java.util.Scanner; Scanner java.util public class Main {

    public static final long MOD = 1000000007;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] params = sc.nextLine().split(" " );
        long n = Long.parseLong( params[0] );
        int k = Integer.parseInt( params[1] );



        System.out.println( Long.toString( n , k ).length() );

    }


} Main public static final long MOD = 1000000007; MOD 1000000007 public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] params = sc.nextLine().split(" " );
        long n = Long.parseLong( params[0] );
        int k = Integer.parseInt( params[1] );



        System.out.println( Long.toString( n , k ).length() );

    } main {
        Scanner sc = new Scanner(System.in);
        String[] params = sc.nextLine().split(" " );
        long n = Long.parseLong( params[0] );
        int k = Integer.parseInt( params[1] );



        System.out.println( Long.toString( n , k ).length() );

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] params = sc.nextLine().split(" " ); params sc.nextLine().split(" " ) sc.nextLine().split sc.nextLine() sc.nextLine sc " " long n = Long.parseLong( params[0] ); n Long.parseLong( params[0] ) Long.parseLong Long params[0] params 0 int k = Integer.parseInt( params[1] ); k Integer.parseInt( params[1] ) Integer.parseInt Integer params[1] params 1 System.out.println( Long.toString( n , k ).length() ) System.out.println System.out System System.out Long.toString( n , k ).length() Long.toString( n , k ).length Long.toString( n , k ) Long.toString Long n k String[] args args public class Main {

    public static final long MOD = 1000000007;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] params = sc.nextLine().split(" " );
        long n = Long.parseLong( params[0] );
        int k = Integer.parseInt( params[1] );



        System.out.println( Long.toString( n , k ).length() );

    }


} public class Main {

    public static final long MOD = 1000000007;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] params = sc.nextLine().split(" " );
        long n = Long.parseLong( params[0] );
        int k = Integer.parseInt( params[1] );



        System.out.println( Long.toString( n , k ).length() );

    }


} Main
import java.util.Scanner;

public class Main {

    public static final long MOD = 1000000007;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] params = sc.nextLine().split(" " );
        long n = Long.parseLong( params[0] );
        int k = Integer.parseInt( params[1] );



        System.out.println( Long.toString( n , k ).length() );

    }


}