import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		List<Integer> list =new ArrayList<Integer>();
		do {
			list.add(n%k);
			n/=k;
		}while(n>0);
		System.out.println(list.size());
	}

} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner 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();
		List<Integer> list =new ArrayList<Integer>();
		do {
			list.add(n%k);
			n/=k;
		}while(n>0);
		System.out.println(list.size());
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		List<Integer> list =new ArrayList<Integer>();
		do {
			list.add(n%k);
			n/=k;
		}while(n>0);
		System.out.println(list.size());
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		List<Integer> list =new ArrayList<Integer>();
		do {
			list.add(n%k);
			n/=k;
		}while(n>0);
		System.out.println(list.size());
	} 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 List<Integer> list =new ArrayList<Integer>(); list new ArrayList<Integer>() do {
			list.add(n%k);
			n/=k;
		}while(n>0); n>0 n 0 {
			list.add(n%k);
			n/=k;
		} list.add(n%k) list.add list n%k n k n/=k n k System.out.println(list.size()) System.out.println System.out System System.out list.size() list.size list 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();
		List<Integer> list =new ArrayList<Integer>();
		do {
			list.add(n%k);
			n/=k;
		}while(n>0);
		System.out.println(list.size());
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		List<Integer> list =new ArrayList<Integer>();
		do {
			list.add(n%k);
			n/=k;
		}while(n>0);
		System.out.println(list.size());
	}

} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		List<Integer> list =new ArrayList<Integer>();
		do {
			list.add(n%k);
			n/=k;
		}while(n>0);
		System.out.println(list.size());
	}

}
