import java.util.*;
public class Main {
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String input = sc.nextLine();
      String[] inputs = input.split(" ");
      int n = Integer.parseInt(inputs[0]);
      int k = Integer.parseInt(inputs[1]);
      
      int count = 0;
      while(n != 0){
        int rem = n % k;
        n /= k;
        count++;
      }
      
      System.out.println(count);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String input = sc.nextLine();
      String[] inputs = input.split(" ");
      int n = Integer.parseInt(inputs[0]);
      int k = Integer.parseInt(inputs[1]);
      
      int count = 0;
      while(n != 0){
        int rem = n % k;
        n /= k;
        count++;
      }
      
      System.out.println(count);
    }
} Main public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String input = sc.nextLine();
      String[] inputs = input.split(" ");
      int n = Integer.parseInt(inputs[0]);
      int k = Integer.parseInt(inputs[1]);
      
      int count = 0;
      while(n != 0){
        int rem = n % k;
        n /= k;
        count++;
      }
      
      System.out.println(count);
    } main {
      Scanner sc = new Scanner(System.in);
      String input = sc.nextLine();
      String[] inputs = input.split(" ");
      int n = Integer.parseInt(inputs[0]);
      int k = Integer.parseInt(inputs[1]);
      
      int count = 0;
      while(n != 0){
        int rem = n % k;
        n /= k;
        count++;
      }
      
      System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String input = sc.nextLine(); input sc.nextLine() sc.nextLine sc String[] inputs = input.split(" "); inputs input.split(" ") input.split input " " int n = Integer.parseInt(inputs[0]); n Integer.parseInt(inputs[0]) Integer.parseInt Integer inputs[0] inputs 0 int k = Integer.parseInt(inputs[1]); k Integer.parseInt(inputs[1]) Integer.parseInt Integer inputs[1] inputs 1 int count = 0; count 0 while(n != 0){
        int rem = n % k;
        n /= k;
        count++;
      } n != 0 n 0 {
        int rem = n % k;
        n /= k;
        count++;
      } int rem = n % k; rem n % k n k n /= k n k count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String input = sc.nextLine();
      String[] inputs = input.split(" ");
      int n = Integer.parseInt(inputs[0]);
      int k = Integer.parseInt(inputs[1]);
      
      int count = 0;
      while(n != 0){
        int rem = n % k;
        n /= k;
        count++;
      }
      
      System.out.println(count);
    }
} public class Main {
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String input = sc.nextLine();
      String[] inputs = input.split(" ");
      int n = Integer.parseInt(inputs[0]);
      int k = Integer.parseInt(inputs[1]);
      
      int count = 0;
      while(n != 0){
        int rem = n % k;
        n /= k;
        count++;
      }
      
      System.out.println(count);
    }
} Main
import java.util.*;
public class Main {
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String input = sc.nextLine();
      String[] inputs = input.split(" ");
      int n = Integer.parseInt(inputs[0]);
      int k = Integer.parseInt(inputs[1]);
      
      int count = 0;
      while(n != 0){
        int rem = n % k;
        n /= k;
        count++;
      }
      
      System.out.println(count);
    }
}