import java.util.*;

public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		long N = keyboard.nextLong();
		int K = keyboard.nextInt();
		int ans = 0;
		
		while(N > 0) {
			N /= K;
			ans++;
		}
			
		System.out.println(ans);
		keyboard.close();	
	}
} import java.util.*; util.* java public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		long N = keyboard.nextLong();
		int K = keyboard.nextInt();
		int ans = 0;
		
		while(N > 0) {
			N /= K;
			ans++;
		}
			
		System.out.println(ans);
		keyboard.close();	
	}
} Main public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		long N = keyboard.nextLong();
		int K = keyboard.nextInt();
		int ans = 0;
		
		while(N > 0) {
			N /= K;
			ans++;
		}
			
		System.out.println(ans);
		keyboard.close();	
	} main {
		
		Scanner keyboard = new Scanner(System.in); 
		
		long N = keyboard.nextLong();
		int K = keyboard.nextInt();
		int ans = 0;
		
		while(N > 0) {
			N /= K;
			ans++;
		}
			
		System.out.println(ans);
		keyboard.close();	
	} Scanner keyboard = new Scanner(System.in); keyboard new Scanner(System.in) long N = keyboard.nextLong(); N keyboard.nextLong() keyboard.nextLong keyboard int K = keyboard.nextInt(); K keyboard.nextInt() keyboard.nextInt keyboard int ans = 0; ans 0 while(N > 0) {
			N /= K;
			ans++;
		} N > 0 N 0 {
			N /= K;
			ans++;
		} N /= K N K ans++ ans System.out.println(ans) System.out.println System.out System System.out ans keyboard.close() keyboard.close keyboard String[] args args public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		long N = keyboard.nextLong();
		int K = keyboard.nextInt();
		int ans = 0;
		
		while(N > 0) {
			N /= K;
			ans++;
		}
			
		System.out.println(ans);
		keyboard.close();	
	}
} public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		long N = keyboard.nextLong();
		int K = keyboard.nextInt();
		int ans = 0;
		
		while(N > 0) {
			N /= K;
			ans++;
		}
			
		System.out.println(ans);
		keyboard.close();	
	}
} Main
import java.util.*;

public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		long N = keyboard.nextLong();
		int K = keyboard.nextInt();
		int ans = 0;
		
		while(N > 0) {
			N /= K;
			ans++;
		}
			
		System.out.println(ans);
		keyboard.close();	
	}
}