
import java.util.Scanner;
public class Main
{
    public static void main(String args[])
    {
        Scanner obj = new Scanner(System.in);
        int n = obj.nextInt(),k = obj.nextInt();
        String s =  Integer.toUnsignedString(n,k);
        System.out.println(s.length());
    }
} import java.util.Scanner; Scanner java.util public class Main
{
    public static void main(String args[])
    {
        Scanner obj = new Scanner(System.in);
        int n = obj.nextInt(),k = obj.nextInt();
        String s =  Integer.toUnsignedString(n,k);
        System.out.println(s.length());
    }
} Main public static void main(String args[])
    {
        Scanner obj = new Scanner(System.in);
        int n = obj.nextInt(),k = obj.nextInt();
        String s =  Integer.toUnsignedString(n,k);
        System.out.println(s.length());
    } main {
        Scanner obj = new Scanner(System.in);
        int n = obj.nextInt(),k = obj.nextInt();
        String s =  Integer.toUnsignedString(n,k);
        System.out.println(s.length());
    } Scanner obj = new Scanner(System.in); obj new Scanner(System.in) int n = obj.nextInt() n obj.nextInt() obj.nextInt obj k = obj.nextInt(); k obj.nextInt() obj.nextInt obj String s =  Integer.toUnsignedString(n,k); s Integer.toUnsignedString(n,k) Integer.toUnsignedString Integer n k System.out.println(s.length()) System.out.println System.out System System.out s.length() s.length s String args[] args public class Main
{
    public static void main(String args[])
    {
        Scanner obj = new Scanner(System.in);
        int n = obj.nextInt(),k = obj.nextInt();
        String s =  Integer.toUnsignedString(n,k);
        System.out.println(s.length());
    }
} public class Main
{
    public static void main(String args[])
    {
        Scanner obj = new Scanner(System.in);
        int n = obj.nextInt(),k = obj.nextInt();
        String s =  Integer.toUnsignedString(n,k);
        System.out.println(s.length());
    }
} Main

import java.util.Scanner;
public class Main
{
    public static void main(String args[])
    {
        Scanner obj = new Scanner(System.in);
        int n = obj.nextInt(),k = obj.nextInt();
        String s =  Integer.toUnsignedString(n,k);
        System.out.println(s.length());
    }
}
