import java.util.*;

class Main{
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int r = sc.nextInt();
        double tmp = Math.log(n)/Math.log(r);
        System.out.println((int)tmp+1);
    }
} import java.util.*; util.* java class Main{
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int r = sc.nextInt();
        double tmp = Math.log(n)/Math.log(r);
        System.out.println((int)tmp+1);
    }
} Main public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int r = sc.nextInt();
        double tmp = Math.log(n)/Math.log(r);
        System.out.println((int)tmp+1);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int r = sc.nextInt();
        double tmp = Math.log(n)/Math.log(r);
        System.out.println((int)tmp+1);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int r = sc.nextInt(); r sc.nextInt() sc.nextInt sc double tmp = Math.log(n)/Math.log(r); tmp Math.log(n)/Math.log(r) Math.log(n) Math.log Math n Math.log(r) Math.log Math r System.out.println((int)tmp+1) System.out.println System.out System System.out (int)tmp+1 (int)tmp 1 String args[] args
import java.util.*;

class Main{
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int r = sc.nextInt();
        double tmp = Math.log(n)/Math.log(r);
        System.out.println((int)tmp+1);
    }
}
