import java.util.*;
public class Main{
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextInt();
    int k = sc.nextInt();
    long a = 0;
    int count = 0;
    for(int i=0 ; i<n ; i++){
      a = (long)Math.pow(k,i);
      if(n/a>0){
        count++;
      }else{
        count++;
        break;
      }
    }
    if(count==1){
      System.out.println(count);
    }else{
      System.out.println(count-1);
    }

  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextInt();
    int k = sc.nextInt();
    long a = 0;
    int count = 0;
    for(int i=0 ; i<n ; i++){
      a = (long)Math.pow(k,i);
      if(n/a>0){
        count++;
      }else{
        count++;
        break;
      }
    }
    if(count==1){
      System.out.println(count);
    }else{
      System.out.println(count-1);
    }

  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextInt();
    int k = sc.nextInt();
    long a = 0;
    int count = 0;
    for(int i=0 ; i<n ; i++){
      a = (long)Math.pow(k,i);
      if(n/a>0){
        count++;
      }else{
        count++;
        break;
      }
    }
    if(count==1){
      System.out.println(count);
    }else{
      System.out.println(count-1);
    }

  } main {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextInt();
    int k = sc.nextInt();
    long a = 0;
    int count = 0;
    for(int i=0 ; i<n ; i++){
      a = (long)Math.pow(k,i);
      if(n/a>0){
        count++;
      }else{
        count++;
        break;
      }
    }
    if(count==1){
      System.out.println(count);
    }else{
      System.out.println(count-1);
    }

  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int k = sc.nextInt(); k sc.nextInt() sc.nextInt sc long a = 0; a 0 int count = 0; count 0 for(int i=0 ; i<n ; i++){
      a = (long)Math.pow(k,i);
      if(n/a>0){
        count++;
      }else{
        count++;
        break;
      }
    } int i=0 ; int i=0 ; i 0 i<n i n i++ i++ i {
      a = (long)Math.pow(k,i);
      if(n/a>0){
        count++;
      }else{
        count++;
        break;
      }
    } {
      a = (long)Math.pow(k,i);
      if(n/a>0){
        count++;
      }else{
        count++;
        break;
      }
    } a = (long)Math.pow(k,i) a (long)Math.pow(k,i) Math.pow Math k i if(n/a>0){
        count++;
      }else{
        count++;
        break;
      } n/a>0 n/a n a 0 {
        count++;
      } count++ count {
        count++;
        break;
      } count++ count break; if(count==1){
      System.out.println(count);
    }else{
      System.out.println(count-1);
    } count==1 count 1 {
      System.out.println(count);
    } System.out.println(count) System.out.println System.out System System.out count {
      System.out.println(count-1);
    } System.out.println(count-1) System.out.println System.out System System.out count-1 count 1 String[] args args public class Main{
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextInt();
    int k = sc.nextInt();
    long a = 0;
    int count = 0;
    for(int i=0 ; i<n ; i++){
      a = (long)Math.pow(k,i);
      if(n/a>0){
        count++;
      }else{
        count++;
        break;
      }
    }
    if(count==1){
      System.out.println(count);
    }else{
      System.out.println(count-1);
    }

  }
} public class Main{
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextInt();
    int k = sc.nextInt();
    long a = 0;
    int count = 0;
    for(int i=0 ; i<n ; i++){
      a = (long)Math.pow(k,i);
      if(n/a>0){
        count++;
      }else{
        count++;
        break;
      }
    }
    if(count==1){
      System.out.println(count);
    }else{
      System.out.println(count-1);
    }

  }
} Main
import java.util.*;
public class Main{
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextInt();
    int k = sc.nextInt();
    long a = 0;
    int count = 0;
    for(int i=0 ; i<n ; i++){
      a = (long)Math.pow(k,i);
      if(n/a>0){
        count++;
      }else{
        count++;
        break;
      }
    }
    if(count==1){
      System.out.println(count);
    }else{
      System.out.println(count-1);
    }

  }
}
