import java.util.Scanner;

class Main {

  public static void main(String[] args) {
    new Main().run();
  }

  private Scanner sc = new Scanner(System.in);

  private void run() {
    long N = Long.parseLong(sc.next());
    int K = Integer.parseInt(sc.next());

    long num = N;
    int digits = 1;
    while (true) {
      num /= K;
      if (num == 0) {
        break;
      }
      digits++;
      if (num == 1) {
        break;
      }
    }
    System.out.println(digits);
  }
} import java.util.Scanner; Scanner java.util class Main {

  public static void main(String[] args) {
    new Main().run();
  }

  private Scanner sc = new Scanner(System.in);

  private void run() {
    long N = Long.parseLong(sc.next());
    int K = Integer.parseInt(sc.next());

    long num = N;
    int digits = 1;
    while (true) {
      num /= K;
      if (num == 0) {
        break;
      }
      digits++;
      if (num == 1) {
        break;
      }
    }
    System.out.println(digits);
  }
} Main private Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
    new Main().run();
  } main {
    new Main().run();
  } new Main().run() new Main().run new Main() String[] args args private void run() {
    long N = Long.parseLong(sc.next());
    int K = Integer.parseInt(sc.next());

    long num = N;
    int digits = 1;
    while (true) {
      num /= K;
      if (num == 0) {
        break;
      }
      digits++;
      if (num == 1) {
        break;
      }
    }
    System.out.println(digits);
  } run {
    long N = Long.parseLong(sc.next());
    int K = Integer.parseInt(sc.next());

    long num = N;
    int digits = 1;
    while (true) {
      num /= K;
      if (num == 0) {
        break;
      }
      digits++;
      if (num == 1) {
        break;
      }
    }
    System.out.println(digits);
  } long N = Long.parseLong(sc.next()); N Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc int K = Integer.parseInt(sc.next()); K Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc long num = N; num N int digits = 1; digits 1 while (true) {
      num /= K;
      if (num == 0) {
        break;
      }
      digits++;
      if (num == 1) {
        break;
      }
    } true {
      num /= K;
      if (num == 0) {
        break;
      }
      digits++;
      if (num == 1) {
        break;
      }
    } num /= K num K if (num == 0) {
        break;
      } num == 0 num 0 {
        break;
      } break; digits++ digits if (num == 1) {
        break;
      } num == 1 num 1 {
        break;
      } break; System.out.println(digits) System.out.println System.out System System.out digits
import java.util.Scanner;

class Main {

  public static void main(String[] args) {
    new Main().run();
  }

  private Scanner sc = new Scanner(System.in);

  private void run() {
    long N = Long.parseLong(sc.next());
    int K = Integer.parseInt(sc.next());

    long num = N;
    int digits = 1;
    while (true) {
      num /= K;
      if (num == 0) {
        break;
      }
      digits++;
      if (num == 1) {
        break;
      }
    }
    System.out.println(digits);
  }
}
