import java.util.*;
import java.math.*;
 
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    if(b == 10) {
      System.out.println(Integer.toString(a).length());
    } else {
      int num = 0;
      for(int i = a; i > 0; i /= b) {
        num++;
      }
      System.out.println(num);
    }
  }
} import java.util.*; util.* java import java.math.*; math.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    if(b == 10) {
      System.out.println(Integer.toString(a).length());
    } else {
      int num = 0;
      for(int i = a; i > 0; i /= b) {
        num++;
      }
      System.out.println(num);
    }
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    if(b == 10) {
      System.out.println(Integer.toString(a).length());
    } else {
      int num = 0;
      for(int i = a; i > 0; i /= b) {
        num++;
      }
      System.out.println(num);
    }
  } main {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    if(b == 10) {
      System.out.println(Integer.toString(a).length());
    } else {
      int num = 0;
      for(int i = a; i > 0; i /= b) {
        num++;
      }
      System.out.println(num);
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc if(b == 10) {
      System.out.println(Integer.toString(a).length());
    } else {
      int num = 0;
      for(int i = a; i > 0; i /= b) {
        num++;
      }
      System.out.println(num);
    } b == 10 b 10 {
      System.out.println(Integer.toString(a).length());
    } System.out.println(Integer.toString(a).length()) System.out.println System.out System System.out Integer.toString(a).length() Integer.toString(a).length Integer.toString(a) Integer.toString Integer a {
      int num = 0;
      for(int i = a; i > 0; i /= b) {
        num++;
      }
      System.out.println(num);
    } int num = 0; num 0 for(int i = a; i > 0; i /= b) {
        num++;
      } int i = a; int i = a; i a i > 0 i 0 i /= b i /= b i b {
        num++;
      } {
        num++;
      } num++ num System.out.println(num) System.out.println System.out System System.out num String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    if(b == 10) {
      System.out.println(Integer.toString(a).length());
    } else {
      int num = 0;
      for(int i = a; i > 0; i /= b) {
        num++;
      }
      System.out.println(num);
    }
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    if(b == 10) {
      System.out.println(Integer.toString(a).length());
    } else {
      int num = 0;
      for(int i = a; i > 0; i /= b) {
        num++;
      }
      System.out.println(num);
    }
  }
} Main
import java.util.*;
import java.math.*;
 
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    if(b == 10) {
      System.out.println(Integer.toString(a).length());
    } else {
      int num = 0;
      for(int i = a; i > 0; i /= b) {
        num++;
      }
      System.out.println(num);
    }
  }
}