import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int K = Integer.parseInt(sc.next());
        int ans = 0;
        while(true){
            int num = (int)Math.pow(K, ans);
            if(num > N){
                break;
            }
            ans += 1;
        }
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int K = Integer.parseInt(sc.next());
        int ans = 0;
        while(true){
            int num = (int)Math.pow(K, ans);
            if(num > N){
                break;
            }
            ans += 1;
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int K = Integer.parseInt(sc.next());
        int ans = 0;
        while(true){
            int num = (int)Math.pow(K, ans);
            if(num > N){
                break;
            }
            ans += 1;
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int K = Integer.parseInt(sc.next());
        int ans = 0;
        while(true){
            int num = (int)Math.pow(K, ans);
            if(num > N){
                break;
            }
            ans += 1;
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int K = Integer.parseInt(sc.next()); K Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int ans = 0; ans 0 while(true){
            int num = (int)Math.pow(K, ans);
            if(num > N){
                break;
            }
            ans += 1;
        } true {
            int num = (int)Math.pow(K, ans);
            if(num > N){
                break;
            }
            ans += 1;
        } int num = (int)Math.pow(K, ans); num (int)Math.pow(K, ans) Math.pow Math K ans if(num > N){
                break;
            } num > N num N {
                break;
            } break; ans += 1 ans 1 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int K = Integer.parseInt(sc.next());
        int ans = 0;
        while(true){
            int num = (int)Math.pow(K, ans);
            if(num > N){
                break;
            }
            ans += 1;
        }
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int K = Integer.parseInt(sc.next());
        int ans = 0;
        while(true){
            int num = (int)Math.pow(K, ans);
            if(num > N){
                break;
            }
            ans += 1;
        }
        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int K = Integer.parseInt(sc.next());
        int ans = 0;
        while(true){
            int num = (int)Math.pow(K, ans);
            if(num > N){
                break;
            }
            ans += 1;
        }
        System.out.println(ans);
    }
}