import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;

public class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args){

		solve_abc165_b();
	}
  
  	public static void solve_abc165_b(){
		
		Scanner sc = new Scanner(System.in);
		
		long N = sc.nextLong();
		int K = sc.nextInt();
		
		String N2 = Long.toString(N,K);
		
		//System.out.println(N2);
		System.out.println(N2.length());
	}
} import java.util.HashMap; HashMap java.util import java.util.HashSet; HashSet java.util import java.util.Map; Map java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args){

		solve_abc165_b();
	}
  
  	public static void solve_abc165_b(){
		
		Scanner sc = new Scanner(System.in);
		
		long N = sc.nextLong();
		int K = sc.nextInt();
		
		String N2 = Long.toString(N,K);
		
		//System.out.println(N2);
		System.out.println(N2.length());
	}
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args){

		solve_abc165_b();
	} main {

		solve_abc165_b();
	} solve_abc165_b() solve_abc165_b String[] args args public static void solve_abc165_b(){
		
		Scanner sc = new Scanner(System.in);
		
		long N = sc.nextLong();
		int K = sc.nextInt();
		
		String N2 = Long.toString(N,K);
		
		//System.out.println(N2);
		System.out.println(N2.length());
	} solve_abc165_b {
		
		Scanner sc = new Scanner(System.in);
		
		long N = sc.nextLong();
		int K = sc.nextInt();
		
		String N2 = Long.toString(N,K);
		
		//System.out.println(N2);
		System.out.println(N2.length());
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc int K = sc.nextInt(); K sc.nextInt() sc.nextInt sc String N2 = Long.toString(N,K); N2 Long.toString(N,K) Long.toString Long N K System.out.println(N2.length()) System.out.println System.out System System.out N2.length() N2.length N2 public class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args){

		solve_abc165_b();
	}
  
  	public static void solve_abc165_b(){
		
		Scanner sc = new Scanner(System.in);
		
		long N = sc.nextLong();
		int K = sc.nextInt();
		
		String N2 = Long.toString(N,K);
		
		//System.out.println(N2);
		System.out.println(N2.length());
	}
} public class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args){

		solve_abc165_b();
	}
  
  	public static void solve_abc165_b(){
		
		Scanner sc = new Scanner(System.in);
		
		long N = sc.nextLong();
		int K = sc.nextInt();
		
		String N2 = Long.toString(N,K);
		
		//System.out.println(N2);
		System.out.println(N2.length());
	}
} Main
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;

public class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args){

		solve_abc165_b();
	}
  
  	public static void solve_abc165_b(){
		
		Scanner sc = new Scanner(System.in);
		
		long N = sc.nextLong();
		int K = sc.nextInt();
		
		String N2 = Long.toString(N,K);
		
		//System.out.println(N2);
		System.out.println(N2.length());
	}
}