import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println(Integer.toString(sc.nextInt(),sc.nextInt()).length());
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println(Integer.toString(sc.nextInt(),sc.nextInt()).length());
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println(Integer.toString(sc.nextInt(),sc.nextInt()).length());
    } main {
        Scanner sc = new Scanner(System.in);
        System.out.println(Integer.toString(sc.nextInt(),sc.nextInt()).length());
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) System.out.println(Integer.toString(sc.nextInt(),sc.nextInt()).length()) System.out.println System.out System System.out Integer.toString(sc.nextInt(),sc.nextInt()).length() Integer.toString(sc.nextInt(),sc.nextInt()).length Integer.toString(sc.nextInt(),sc.nextInt()) Integer.toString Integer sc.nextInt() sc.nextInt sc sc.nextInt() sc.nextInt sc String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println(Integer.toString(sc.nextInt(),sc.nextInt()).length());
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println(Integer.toString(sc.nextInt(),sc.nextInt()).length());
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println(Integer.toString(sc.nextInt(),sc.nextInt()).length());
    }
}
