import java.util.ArrayList;
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()); // 基数
        ArrayList<Integer> list = new ArrayList<>();
        while (n >= 1) {
            list.add(n % k);
            n /= k;
        }
        System.out.println(list.size());
        sc.close();
    }
} import java.util.ArrayList; ArrayList java.util 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()); // 基数
        ArrayList<Integer> list = new ArrayList<>();
        while (n >= 1) {
            list.add(n % k);
            n /= k;
        }
        System.out.println(list.size());
        sc.close();
    }
} 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()); // 基数
        ArrayList<Integer> list = new ArrayList<>();
        while (n >= 1) {
            list.add(n % k);
            n /= k;
        }
        System.out.println(list.size());
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next()); // 整数
        int k = Integer.parseInt(sc.next()); // 基数
        ArrayList<Integer> list = new ArrayList<>();
        while (n >= 1) {
            list.add(n % k);
            n /= k;
        }
        System.out.println(list.size());
        sc.close();
    } 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 ArrayList<Integer> list = new ArrayList<>(); list new ArrayList<>() while (n >= 1) {
            list.add(n % k);
            n /= k;
        } n >= 1 n 1 {
            list.add(n % k);
            n /= k;
        } list.add(n % k) list.add list n % k n k n /= k n k System.out.println(list.size()) System.out.println System.out System System.out list.size() list.size list sc.close() sc.close sc 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()); // 基数
        ArrayList<Integer> list = new ArrayList<>();
        while (n >= 1) {
            list.add(n % k);
            n /= k;
        }
        System.out.println(list.size());
        sc.close();
    }
} 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()); // 基数
        ArrayList<Integer> list = new ArrayList<>();
        while (n >= 1) {
            list.add(n % k);
            n /= k;
        }
        System.out.println(list.size());
        sc.close();
    }
} Main
import java.util.ArrayList;
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()); // 基数
        ArrayList<Integer> list = new ArrayList<>();
        while (n >= 1) {
            list.add(n % k);
            n /= k;
        }
        System.out.println(list.size());
        sc.close();
    }
}
