import java.util.*;
public class Main{
 public static void main(String args[]){
   Scanner sc = new Scanner(System.in);
   int n = sc.nextInt();
   int k = sc.nextInt();
   int count = 1;
   while(true){
    if(n/(int)(Math.pow(k,count))==0) break;
    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);
   int n = sc.nextInt();
   int k = sc.nextInt();
   int count = 1;
   while(true){
    if(n/(int)(Math.pow(k,count))==0) break;
    count++;
   }
   System.out.println(""+count);
 }
} Main public static void main(String args[]){
   Scanner sc = new Scanner(System.in);
   int n = sc.nextInt();
   int k = sc.nextInt();
   int count = 1;
   while(true){
    if(n/(int)(Math.pow(k,count))==0) break;
    count++;
   }
   System.out.println(""+count);
 } main {
   Scanner sc = new Scanner(System.in);
   int n = sc.nextInt();
   int k = sc.nextInt();
   int count = 1;
   while(true){
    if(n/(int)(Math.pow(k,count))==0) break;
    count++;
   }
   System.out.println(""+count);
 } 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 count = 1; count 1 while(true){
    if(n/(int)(Math.pow(k,count))==0) break;
    count++;
   } true {
    if(n/(int)(Math.pow(k,count))==0) break;
    count++;
   } if(n/(int)(Math.pow(k,count))==0) break; n/(int)(Math.pow(k,count))==0 n/(int)(Math.pow(k,count)) n (int)(Math.pow(k,count)) Math.pow Math k count 0 break; count++ count System.out.println(""+count) System.out.println System.out System System.out ""+count "" count String args[] args public class Main{
 public static void main(String args[]){
   Scanner sc = new Scanner(System.in);
   int n = sc.nextInt();
   int k = sc.nextInt();
   int count = 1;
   while(true){
    if(n/(int)(Math.pow(k,count))==0) break;
    count++;
   }
   System.out.println(""+count);
 }
} public class Main{
 public static void main(String args[]){
   Scanner sc = new Scanner(System.in);
   int n = sc.nextInt();
   int k = sc.nextInt();
   int count = 1;
   while(true){
    if(n/(int)(Math.pow(k,count))==0) break;
    count++;
   }
   System.out.println(""+count);
 }
} Main
import java.util.*;
public class Main{
 public static void main(String args[]){
   Scanner sc = new Scanner(System.in);
   int n = sc.nextInt();
   int k = sc.nextInt();
   int count = 1;
   while(true){
    if(n/(int)(Math.pow(k,count))==0) break;
    count++;
   }
   System.out.println(""+count);
 }
}