import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    int K = sc.nextInt();
    int i=1, ans =0;
    while (true) {
      if ((long)N < Math.pow(K,i)) { 
        ans = i;
        break;
      }
      i++;
    }
    System.out.println(ans);
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    int K = sc.nextInt();
    int i=1, ans =0;
    while (true) {
      if ((long)N < Math.pow(K,i)) { 
        ans = i;
        break;
      }
      i++;
    }
    System.out.println(ans);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    int K = sc.nextInt();
    int i=1, ans =0;
    while (true) {
      if ((long)N < Math.pow(K,i)) { 
        ans = i;
        break;
      }
      i++;
    }
    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    int K = sc.nextInt();
    int i=1, ans =0;
    while (true) {
      if ((long)N < Math.pow(K,i)) { 
        ans = i;
        break;
      }
      i++;
    }
    System.out.println(ans);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc int K = sc.nextInt(); K sc.nextInt() sc.nextInt sc int i=1 i 1 ans =0; ans 0 while (true) {
      if ((long)N < Math.pow(K,i)) { 
        ans = i;
        break;
      }
      i++;
    } true {
      if ((long)N < Math.pow(K,i)) { 
        ans = i;
        break;
      }
      i++;
    } if ((long)N < Math.pow(K,i)) { 
        ans = i;
        break;
      } (long)N < Math.pow(K,i) (long)N Math.pow(K,i) Math.pow Math K i { 
        ans = i;
        break;
      } ans = i ans i break; i++ i System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    int K = sc.nextInt();
    int i=1, ans =0;
    while (true) {
      if ((long)N < Math.pow(K,i)) { 
        ans = i;
        break;
      }
      i++;
    }
    System.out.println(ans);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    int K = sc.nextInt();
    int i=1, ans =0;
    while (true) {
      if ((long)N < Math.pow(K,i)) { 
        ans = i;
        break;
      }
      i++;
    }
    System.out.println(ans);
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    int K = sc.nextInt();
    int i=1, ans =0;
    while (true) {
      if ((long)N < Math.pow(K,i)) { 
        ans = i;
        break;
      }
      i++;
    }
    System.out.println(ans);
  }
}