import java.util.Scanner;
public class Main {
    public static void main(String args[]) {
        Scanner s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int k = Integer.parseInt(s.next());

        int count = 1;


        for(int i=1;i<n;){
            i = i * k;

            if(n/i >= 1){
            count++;

            }
        }

        System.out.println(count);

        
        }

} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String args[]) {
        Scanner s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int k = Integer.parseInt(s.next());

        int count = 1;


        for(int i=1;i<n;){
            i = i * k;

            if(n/i >= 1){
            count++;

            }
        }

        System.out.println(count);

        
        }

} Main public static void main(String args[]) {
        Scanner s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int k = Integer.parseInt(s.next());

        int count = 1;


        for(int i=1;i<n;){
            i = i * k;

            if(n/i >= 1){
            count++;

            }
        }

        System.out.println(count);

        
        } main {
        Scanner s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int k = Integer.parseInt(s.next());

        int count = 1;


        for(int i=1;i<n;){
            i = i * k;

            if(n/i >= 1){
            count++;

            }
        }

        System.out.println(count);

        
        } Scanner s = new Scanner(System.in); s new Scanner(System.in) int n = Integer.parseInt(s.next()); n Integer.parseInt(s.next()) Integer.parseInt Integer s.next() s.next s int k = Integer.parseInt(s.next()); k Integer.parseInt(s.next()) Integer.parseInt Integer s.next() s.next s int count = 1; count 1 for(int i=1;i<n;){
            i = i * k;

            if(n/i >= 1){
            count++;

            }
        } int i=1; int i=1; i 1 i<n i n {
            i = i * k;

            if(n/i >= 1){
            count++;

            }
        } {
            i = i * k;

            if(n/i >= 1){
            count++;

            }
        } i = i * k i i * k i k if(n/i >= 1){
            count++;

            } n/i >= 1 n/i n i 1 {
            count++;

            } count++ count 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[]) {
        Scanner s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int k = Integer.parseInt(s.next());

        int count = 1;


        for(int i=1;i<n;){
            i = i * k;

            if(n/i >= 1){
            count++;

            }
        }

        System.out.println(count);

        
        }

} public class Main {
    public static void main(String args[]) {
        Scanner s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int k = Integer.parseInt(s.next());

        int count = 1;


        for(int i=1;i<n;){
            i = i * k;

            if(n/i >= 1){
            count++;

            }
        }

        System.out.println(count);

        
        }

} Main
import java.util.Scanner;
public class Main {
    public static void main(String args[]) {
        Scanner s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int k = Integer.parseInt(s.next());

        int count = 1;


        for(int i=1;i<n;){
            i = i * k;

            if(n/i >= 1){
            count++;

            }
        }

        System.out.println(count);

        
        }

}
