
import java.util.Scanner;


public class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n= input.nextInt();
        int k = input.nextInt();
        String t="";
        while(n> 0){
       t = t+n%k;
       n = n/k;
     }
        System.out.println(t.length());
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n= input.nextInt();
        int k = input.nextInt();
        String t="";
        while(n> 0){
       t = t+n%k;
       n = n/k;
     }
        System.out.println(t.length());
    }
} Main public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n= input.nextInt();
        int k = input.nextInt();
        String t="";
        while(n> 0){
       t = t+n%k;
       n = n/k;
     }
        System.out.println(t.length());
    } main {
        Scanner input = new Scanner(System.in);
        int n= input.nextInt();
        int k = input.nextInt();
        String t="";
        while(n> 0){
       t = t+n%k;
       n = n/k;
     }
        System.out.println(t.length());
    } Scanner input = new Scanner(System.in); input new Scanner(System.in) int n= input.nextInt(); n input.nextInt() input.nextInt input int k = input.nextInt(); k input.nextInt() input.nextInt input String t=""; t "" while(n> 0){
       t = t+n%k;
       n = n/k;
     } n> 0 n 0 {
       t = t+n%k;
       n = n/k;
     } t = t+n%k t t+n%k t n%k n k n = n/k n n/k n k System.out.println(t.length()) System.out.println System.out System System.out t.length() t.length t String[] args args public class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n= input.nextInt();
        int k = input.nextInt();
        String t="";
        while(n> 0){
       t = t+n%k;
       n = n/k;
     }
        System.out.println(t.length());
    }
} public class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n= input.nextInt();
        int k = input.nextInt();
        String t="";
        while(n> 0){
       t = t+n%k;
       n = n/k;
     }
        System.out.println(t.length());
    }
} Main

import java.util.Scanner;


public class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n= input.nextInt();
        int k = input.nextInt();
        String t="";
        while(n> 0){
       t = t+n%k;
       n = n/k;
     }
        System.out.println(t.length());
    }
}
