import java.util.*;
class Main{
    public static void main(String[] args){
	Scanner stdIn = new Scanner(System.in);
	long N =Long.parseLong(stdIn.next());
	int K = stdIn.nextInt();
	int count=0;
	while(N!=0){
	    N/=K;
	    count++;
	}
	System.out.println(count);
    }
}
	     import java.util.*; util.* java class Main{
    public static void main(String[] args){
	Scanner stdIn = new Scanner(System.in);
	long N =Long.parseLong(stdIn.next());
	int K = stdIn.nextInt();
	int count=0;
	while(N!=0){
	    N/=K;
	    count++;
	}
	System.out.println(count);
    }
} Main public static void main(String[] args){
	Scanner stdIn = new Scanner(System.in);
	long N =Long.parseLong(stdIn.next());
	int K = stdIn.nextInt();
	int count=0;
	while(N!=0){
	    N/=K;
	    count++;
	}
	System.out.println(count);
    } main {
	Scanner stdIn = new Scanner(System.in);
	long N =Long.parseLong(stdIn.next());
	int K = stdIn.nextInt();
	int count=0;
	while(N!=0){
	    N/=K;
	    count++;
	}
	System.out.println(count);
    } Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) long N =Long.parseLong(stdIn.next()); N Long.parseLong(stdIn.next()) Long.parseLong Long stdIn.next() stdIn.next stdIn int K = stdIn.nextInt(); K stdIn.nextInt() stdIn.nextInt stdIn int count=0; count 0 while(N!=0){
	    N/=K;
	    count++;
	} N!=0 N 0 {
	    N/=K;
	    count++;
	} N/=K N K count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args
import java.util.*;
class Main{
    public static void main(String[] args){
	Scanner stdIn = new Scanner(System.in);
	long N =Long.parseLong(stdIn.next());
	int K = stdIn.nextInt();
	int count=0;
	while(N!=0){
	    N/=K;
	    count++;
	}
	System.out.println(count);
    }
}
	    
