
import java.util.Scanner;

public class Main {
    public static void main(String [] args) {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        long k = scanner.nextLong();
        int len = 0;
        if (n == 0) {
            System.out.println(1);
            return;
        }
        while (n > 0) {
            ++len;
            n /= k;
        }
        System.out.println(len);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String [] args) {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        long k = scanner.nextLong();
        int len = 0;
        if (n == 0) {
            System.out.println(1);
            return;
        }
        while (n > 0) {
            ++len;
            n /= k;
        }
        System.out.println(len);
    }
} Main public static void main(String [] args) {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        long k = scanner.nextLong();
        int len = 0;
        if (n == 0) {
            System.out.println(1);
            return;
        }
        while (n > 0) {
            ++len;
            n /= k;
        }
        System.out.println(len);
    } main {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        long k = scanner.nextLong();
        int len = 0;
        if (n == 0) {
            System.out.println(1);
            return;
        }
        while (n > 0) {
            ++len;
            n /= k;
        }
        System.out.println(len);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) long n = scanner.nextLong(); n scanner.nextLong() scanner.nextLong scanner long k = scanner.nextLong(); k scanner.nextLong() scanner.nextLong scanner int len = 0; len 0 if (n == 0) {
            System.out.println(1);
            return;
        } n == 0 n 0 {
            System.out.println(1);
            return;
        } System.out.println(1) System.out.println System.out System System.out 1 return; while (n > 0) {
            ++len;
            n /= k;
        } n > 0 n 0 {
            ++len;
            n /= k;
        } ++len len n /= k n k System.out.println(len) System.out.println System.out System System.out len String [] args args public class Main {
    public static void main(String [] args) {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        long k = scanner.nextLong();
        int len = 0;
        if (n == 0) {
            System.out.println(1);
            return;
        }
        while (n > 0) {
            ++len;
            n /= k;
        }
        System.out.println(len);
    }
} public class Main {
    public static void main(String [] args) {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        long k = scanner.nextLong();
        int len = 0;
        if (n == 0) {
            System.out.println(1);
            return;
        }
        while (n > 0) {
            ++len;
            n /= k;
        }
        System.out.println(len);
    }
} Main

import java.util.Scanner;

public class Main {
    public static void main(String [] args) {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        long k = scanner.nextLong();
        int len = 0;
        if (n == 0) {
            System.out.println(1);
            return;
        }
        while (n > 0) {
            ++len;
            n /= k;
        }
        System.out.println(len);
    }
}
