import java.util.Scanner;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    
    int ans = 0;
    
    for(int i=0; i<50000; i++){
      if(n > 0){
        n /= k;
        ans++;
      }else if(n == 0){
        break;
      }else{}
    }
    
    System.out.println(ans);
    
  }
} import java.util.Scanner; Scanner java.util class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    
    int ans = 0;
    
    for(int i=0; i<50000; i++){
      if(n > 0){
        n /= k;
        ans++;
      }else if(n == 0){
        break;
      }else{}
    }
    
    System.out.println(ans);
    
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    
    int ans = 0;
    
    for(int i=0; i<50000; i++){
      if(n > 0){
        n /= k;
        ans++;
      }else if(n == 0){
        break;
      }else{}
    }
    
    System.out.println(ans);
    
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    
    int ans = 0;
    
    for(int i=0; i<50000; i++){
      if(n > 0){
        n /= k;
        ans++;
      }else if(n == 0){
        break;
      }else{}
    }
    
    System.out.println(ans);
    
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int k = sc.nextInt(); k sc.nextInt() sc.nextInt sc int ans = 0; ans 0 for(int i=0; i<50000; i++){
      if(n > 0){
        n /= k;
        ans++;
      }else if(n == 0){
        break;
      }else{}
    } int i=0; int i=0; i 0 i<50000 i 50000 i++ i++ i {
      if(n > 0){
        n /= k;
        ans++;
      }else if(n == 0){
        break;
      }else{}
    } {
      if(n > 0){
        n /= k;
        ans++;
      }else if(n == 0){
        break;
      }else{}
    } if(n > 0){
        n /= k;
        ans++;
      }else if(n == 0){
        break;
      }else{} n > 0 n 0 {
        n /= k;
        ans++;
      } n /= k n k ans++ ans if(n == 0){
        break;
      }else{} n == 0 n 0 {
        break;
      } break; {} System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.Scanner;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    
    int ans = 0;
    
    for(int i=0; i<50000; i++){
      if(n > 0){
        n /= k;
        ans++;
      }else if(n == 0){
        break;
      }else{}
    }
    
    System.out.println(ans);
    
  }
}
