    import java.util.*;
	import java.lang.Math;
    public class Main
	{
		public static void numberbase(int n, int base)
		{
			int[] array = new int[100];
			int i=0;
			int count=0;
			while(n>0)
			{
				array[i]=n%base;
				n=n/base;
				i++;
				count++;
			}
			/*for (int j = i - 1; j >= 0; j--) 
            {
				System.out.print(array[j]);
				count++;
			}*/
			System.out.println(count);
		}
		public static void main(String args[])
		{
			Scanner scan = new Scanner(System.in);
			int n = scan.nextInt();
			int base = scan.nextInt();
			numberbase(n,base);
		}
    } import java.util.*; util.* java import java.lang.Math; Math java.lang public class Main
	{
		public static void numberbase(int n, int base)
		{
			int[] array = new int[100];
			int i=0;
			int count=0;
			while(n>0)
			{
				array[i]=n%base;
				n=n/base;
				i++;
				count++;
			}
			/*for (int j = i - 1; j >= 0; j--) 
            {
				System.out.print(array[j]);
				count++;
			}*/
			System.out.println(count);
		}
		public static void main(String args[])
		{
			Scanner scan = new Scanner(System.in);
			int n = scan.nextInt();
			int base = scan.nextInt();
			numberbase(n,base);
		}
    } Main public static void numberbase(int n, int base)
		{
			int[] array = new int[100];
			int i=0;
			int count=0;
			while(n>0)
			{
				array[i]=n%base;
				n=n/base;
				i++;
				count++;
			}
			/*for (int j = i - 1; j >= 0; j--) 
            {
				System.out.print(array[j]);
				count++;
			}*/
			System.out.println(count);
		} numberbase {
			int[] array = new int[100];
			int i=0;
			int count=0;
			while(n>0)
			{
				array[i]=n%base;
				n=n/base;
				i++;
				count++;
			}
			/*for (int j = i - 1; j >= 0; j--) 
            {
				System.out.print(array[j]);
				count++;
			}*/
			System.out.println(count);
		} int[] array = new int[100]; array new int[100] 100 int i=0; i 0 int count=0; count 0 while(n>0)
			{
				array[i]=n%base;
				n=n/base;
				i++;
				count++;
			} n>0 n 0 {
				array[i]=n%base;
				n=n/base;
				i++;
				count++;
			} array[i]=n%base array[i] array i n%base n base n=n/base n n/base n base i++ i count++ count System.out.println(count) System.out.println System.out System System.out count int n n int base base public static void main(String args[])
		{
			Scanner scan = new Scanner(System.in);
			int n = scan.nextInt();
			int base = scan.nextInt();
			numberbase(n,base);
		} main {
			Scanner scan = new Scanner(System.in);
			int n = scan.nextInt();
			int base = scan.nextInt();
			numberbase(n,base);
		} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int base = scan.nextInt(); base scan.nextInt() scan.nextInt scan numberbase(n,base) numberbase n base String args[] args public class Main
	{
		public static void numberbase(int n, int base)
		{
			int[] array = new int[100];
			int i=0;
			int count=0;
			while(n>0)
			{
				array[i]=n%base;
				n=n/base;
				i++;
				count++;
			}
			/*for (int j = i - 1; j >= 0; j--) 
            {
				System.out.print(array[j]);
				count++;
			}*/
			System.out.println(count);
		}
		public static void main(String args[])
		{
			Scanner scan = new Scanner(System.in);
			int n = scan.nextInt();
			int base = scan.nextInt();
			numberbase(n,base);
		}
    } public class Main
	{
		public static void numberbase(int n, int base)
		{
			int[] array = new int[100];
			int i=0;
			int count=0;
			while(n>0)
			{
				array[i]=n%base;
				n=n/base;
				i++;
				count++;
			}
			/*for (int j = i - 1; j >= 0; j--) 
            {
				System.out.print(array[j]);
				count++;
			}*/
			System.out.println(count);
		}
		public static void main(String args[])
		{
			Scanner scan = new Scanner(System.in);
			int n = scan.nextInt();
			int base = scan.nextInt();
			numberbase(n,base);
		}
    } Main
    import java.util.*;
	import java.lang.Math;
    public class Main
	{
		public static void numberbase(int n, int base)
		{
			int[] array = new int[100];
			int i=0;
			int count=0;
			while(n>0)
			{
				array[i]=n%base;
				n=n/base;
				i++;
				count++;
			}
			/*for (int j = i - 1; j >= 0; j--) 
            {
				System.out.print(array[j]);
				count++;
			}*/
			System.out.println(count);
		}
		public static void main(String args[])
		{
			Scanner scan = new Scanner(System.in);
			int n = scan.nextInt();
			int base = scan.nextInt();
			numberbase(n,base);
		}
    }