import java.util.*;

public class Main {
    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        long n = Long.parseLong(sc.next());
        long k = Long.parseLong(sc.next());
        StringBuilder sb = new StringBuilder();
        while(n > 0L) {
            sb.append(n % k);
            n /= k;
        }
        System.out.println(sb.toString().length());
    }
} import java.util.*; util.* java public class Main {
    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        long n = Long.parseLong(sc.next());
        long k = Long.parseLong(sc.next());
        StringBuilder sb = new StringBuilder();
        while(n > 0L) {
            sb.append(n % k);
            n /= k;
        }
        System.out.println(sb.toString().length());
    }
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
        long n = Long.parseLong(sc.next());
        long k = Long.parseLong(sc.next());
        StringBuilder sb = new StringBuilder();
        while(n > 0L) {
            sb.append(n % k);
            n /= k;
        }
        System.out.println(sb.toString().length());
    } main {
        long n = Long.parseLong(sc.next());
        long k = Long.parseLong(sc.next());
        StringBuilder sb = new StringBuilder();
        while(n > 0L) {
            sb.append(n % k);
            n /= k;
        }
        System.out.println(sb.toString().length());
    } long n = Long.parseLong(sc.next()); n Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc long k = Long.parseLong(sc.next()); k Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc StringBuilder sb = new StringBuilder(); sb new StringBuilder() while(n > 0L) {
            sb.append(n % k);
            n /= k;
        } n > 0L n 0L {
            sb.append(n % k);
            n /= k;
        } sb.append(n % k) sb.append sb n % k n k n /= k n k System.out.println(sb.toString().length()) System.out.println System.out System System.out sb.toString().length() sb.toString().length sb.toString() sb.toString sb String[] args args public class Main {
    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        long n = Long.parseLong(sc.next());
        long k = Long.parseLong(sc.next());
        StringBuilder sb = new StringBuilder();
        while(n > 0L) {
            sb.append(n % k);
            n /= k;
        }
        System.out.println(sb.toString().length());
    }
} public class Main {
    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        long n = Long.parseLong(sc.next());
        long k = Long.parseLong(sc.next());
        StringBuilder sb = new StringBuilder();
        while(n > 0L) {
            sb.append(n % k);
            n /= k;
        }
        System.out.println(sb.toString().length());
    }
} Main
import java.util.*;

public class Main {
    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        long n = Long.parseLong(sc.next());
        long k = Long.parseLong(sc.next());
        StringBuilder sb = new StringBuilder();
        while(n > 0L) {
            sb.append(n % k);
            n /= k;
        }
        System.out.println(sb.toString().length());
    }
}