import java.util.Scanner;

public class Main {
  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    String sValue = sc.nextLine();
    String[] sSplitVal = sValue.split(" ");
    String s1 = sSplitVal[0];
    int i2 = Integer.parseInt(sSplitVal[1]);
    String sm = Long.toString(Long.parseLong(s1, 10), i2);
    System.out.print(sm.length());
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    String sValue = sc.nextLine();
    String[] sSplitVal = sValue.split(" ");
    String s1 = sSplitVal[0];
    int i2 = Integer.parseInt(sSplitVal[1]);
    String sm = Long.toString(Long.parseLong(s1, 10), i2);
    System.out.print(sm.length());
  }
} Main public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    String sValue = sc.nextLine();
    String[] sSplitVal = sValue.split(" ");
    String s1 = sSplitVal[0];
    int i2 = Integer.parseInt(sSplitVal[1]);
    String sm = Long.toString(Long.parseLong(s1, 10), i2);
    System.out.print(sm.length());
  } main {

    Scanner sc = new Scanner(System.in);
    String sValue = sc.nextLine();
    String[] sSplitVal = sValue.split(" ");
    String s1 = sSplitVal[0];
    int i2 = Integer.parseInt(sSplitVal[1]);
    String sm = Long.toString(Long.parseLong(s1, 10), i2);
    System.out.print(sm.length());
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String sValue = sc.nextLine(); sValue sc.nextLine() sc.nextLine sc String[] sSplitVal = sValue.split(" "); sSplitVal sValue.split(" ") sValue.split sValue " " String s1 = sSplitVal[0]; s1 sSplitVal[0] sSplitVal 0 int i2 = Integer.parseInt(sSplitVal[1]); i2 Integer.parseInt(sSplitVal[1]) Integer.parseInt Integer sSplitVal[1] sSplitVal 1 String sm = Long.toString(Long.parseLong(s1, 10), i2); sm Long.toString(Long.parseLong(s1, 10), i2) Long.toString Long Long.parseLong(s1, 10) Long.parseLong Long s1 10 i2 System.out.print(sm.length()) System.out.print System.out System System.out sm.length() sm.length sm String[] args args public class Main {
  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    String sValue = sc.nextLine();
    String[] sSplitVal = sValue.split(" ");
    String s1 = sSplitVal[0];
    int i2 = Integer.parseInt(sSplitVal[1]);
    String sm = Long.toString(Long.parseLong(s1, 10), i2);
    System.out.print(sm.length());
  }
} public class Main {
  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    String sValue = sc.nextLine();
    String[] sSplitVal = sValue.split(" ");
    String s1 = sSplitVal[0];
    int i2 = Integer.parseInt(sSplitVal[1]);
    String sm = Long.toString(Long.parseLong(s1, 10), i2);
    System.out.print(sm.length());
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    String sValue = sc.nextLine();
    String[] sSplitVal = sValue.split(" ");
    String s1 = sSplitVal[0];
    int i2 = Integer.parseInt(sSplitVal[1]);
    String sm = Long.toString(Long.parseLong(s1, 10), i2);
    System.out.print(sm.length());
  }
}
