import java.util.Scanner;

class Main{

    public static void main(String[] args){
        
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        long r = scanner.nextLong();
        scanner.close();
        int count = 0;
        while(n>=r){
            count += 1;
            n = n/r;
        }
        System.out.println(count+1);
    }
} import java.util.Scanner; Scanner java.util class Main{

    public static void main(String[] args){
        
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        long r = scanner.nextLong();
        scanner.close();
        int count = 0;
        while(n>=r){
            count += 1;
            n = n/r;
        }
        System.out.println(count+1);
    }
} Main public static void main(String[] args){
        
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        long r = scanner.nextLong();
        scanner.close();
        int count = 0;
        while(n>=r){
            count += 1;
            n = n/r;
        }
        System.out.println(count+1);
    } main {
        
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        long r = scanner.nextLong();
        scanner.close();
        int count = 0;
        while(n>=r){
            count += 1;
            n = n/r;
        }
        System.out.println(count+1);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) long n = scanner.nextLong(); n scanner.nextLong() scanner.nextLong scanner long r = scanner.nextLong(); r scanner.nextLong() scanner.nextLong scanner scanner.close() scanner.close scanner int count = 0; count 0 while(n>=r){
            count += 1;
            n = n/r;
        } n>=r n r {
            count += 1;
            n = n/r;
        } count += 1 count 1 n = n/r n n/r n r System.out.println(count+1) System.out.println System.out System System.out count+1 count 1 String[] args args
import java.util.Scanner;

class Main{

    public static void main(String[] args){
        
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        long r = scanner.nextLong();
        scanner.close();
        int count = 0;
        while(n>=r){
            count += 1;
            n = n/r;
        }
        System.out.println(count+1);
    }
}