import java.util.*;
class Main
{
    public static void main(String arg[])
    {
        int count=0,s,n1;
        Scanner sc = new Scanner(System.in);
        try {
            int n = sc.nextInt();
            int b= sc.nextInt();
            if(b>0&&b<=10)
            {
                while(n>0)
                {
                    s=n%b;
                    n=n/b;
                    count++;
                }
            }
        } catch(Exception e) {
        } 
        System.out.println(count);
    }
} import java.util.*; util.* java class Main
{
    public static void main(String arg[])
    {
        int count=0,s,n1;
        Scanner sc = new Scanner(System.in);
        try {
            int n = sc.nextInt();
            int b= sc.nextInt();
            if(b>0&&b<=10)
            {
                while(n>0)
                {
                    s=n%b;
                    n=n/b;
                    count++;
                }
            }
        } catch(Exception e) {
        } 
        System.out.println(count);
    }
} Main public static void main(String arg[])
    {
        int count=0,s,n1;
        Scanner sc = new Scanner(System.in);
        try {
            int n = sc.nextInt();
            int b= sc.nextInt();
            if(b>0&&b<=10)
            {
                while(n>0)
                {
                    s=n%b;
                    n=n/b;
                    count++;
                }
            }
        } catch(Exception e) {
        } 
        System.out.println(count);
    } main {
        int count=0,s,n1;
        Scanner sc = new Scanner(System.in);
        try {
            int n = sc.nextInt();
            int b= sc.nextInt();
            if(b>0&&b<=10)
            {
                while(n>0)
                {
                    s=n%b;
                    n=n/b;
                    count++;
                }
            }
        } catch(Exception e) {
        } 
        System.out.println(count);
    } int count=0 count 0 s s n1; n1 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) try {
            int n = sc.nextInt();
            int b= sc.nextInt();
            if(b>0&&b<=10)
            {
                while(n>0)
                {
                    s=n%b;
                    n=n/b;
                    count++;
                }
            }
        } catch(Exception e) {
        } catch(Exception e) {
        } Exception e {
        } {
            int n = sc.nextInt();
            int b= sc.nextInt();
            if(b>0&&b<=10)
            {
                while(n>0)
                {
                    s=n%b;
                    n=n/b;
                    count++;
                }
            }
        } int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int b= sc.nextInt(); b sc.nextInt() sc.nextInt sc if(b>0&&b<=10)
            {
                while(n>0)
                {
                    s=n%b;
                    n=n/b;
                    count++;
                }
            } b>0&&b<=10 b>0 b 0 b<=10 b 10 {
                while(n>0)
                {
                    s=n%b;
                    n=n/b;
                    count++;
                }
            } while(n>0)
                {
                    s=n%b;
                    n=n/b;
                    count++;
                } n>0 n 0 {
                    s=n%b;
                    n=n/b;
                    count++;
                } s=n%b s n%b n b n=n/b n n/b n b count++ count System.out.println(count) System.out.println System.out System System.out count String arg[] arg
import java.util.*;
class Main
{
    public static void main(String arg[])
    {
        int count=0,s,n1;
        Scanner sc = new Scanner(System.in);
        try {
            int n = sc.nextInt();
            int b= sc.nextInt();
            if(b>0&&b<=10)
            {
                while(n>0)
                {
                    s=n%b;
                    n=n/b;
                    count++;
                }
            }
        } catch(Exception e) {
        } 
        System.out.println(count);
    }
}