import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;

public class Main{
	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		String[] tmp = scanner.nextLine().split(" ");
		int n = Integer.parseInt(tmp[0]);
		int k = Integer.parseInt(tmp[1]);
		List<Character> list = new LinkedList<Character>();

		while(n > 0) {

			list.add((char) (n % k));
			n /= k;

		}



		System.out.println(list.size());

	}
} import java.util.LinkedList; LinkedList 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 scanner = new Scanner(System.in);

		String[] tmp = scanner.nextLine().split(" ");
		int n = Integer.parseInt(tmp[0]);
		int k = Integer.parseInt(tmp[1]);
		List<Character> list = new LinkedList<Character>();

		while(n > 0) {

			list.add((char) (n % k));
			n /= k;

		}



		System.out.println(list.size());

	}
} Main public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		String[] tmp = scanner.nextLine().split(" ");
		int n = Integer.parseInt(tmp[0]);
		int k = Integer.parseInt(tmp[1]);
		List<Character> list = new LinkedList<Character>();

		while(n > 0) {

			list.add((char) (n % k));
			n /= k;

		}



		System.out.println(list.size());

	} main {

		Scanner scanner = new Scanner(System.in);

		String[] tmp = scanner.nextLine().split(" ");
		int n = Integer.parseInt(tmp[0]);
		int k = Integer.parseInt(tmp[1]);
		List<Character> list = new LinkedList<Character>();

		while(n > 0) {

			list.add((char) (n % k));
			n /= k;

		}



		System.out.println(list.size());

	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String[] tmp = scanner.nextLine().split(" "); tmp scanner.nextLine().split(" ") scanner.nextLine().split scanner.nextLine() scanner.nextLine scanner " " int n = Integer.parseInt(tmp[0]); n Integer.parseInt(tmp[0]) Integer.parseInt Integer tmp[0] tmp 0 int k = Integer.parseInt(tmp[1]); k Integer.parseInt(tmp[1]) Integer.parseInt Integer tmp[1] tmp 1 List<Character> list = new LinkedList<Character>(); list new LinkedList<Character>() while(n > 0) {

			list.add((char) (n % k));
			n /= k;

		} n > 0 n 0 {

			list.add((char) (n % k));
			n /= k;

		} list.add((char) (n % k)) list.add list (char) (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 scanner = new Scanner(System.in);

		String[] tmp = scanner.nextLine().split(" ");
		int n = Integer.parseInt(tmp[0]);
		int k = Integer.parseInt(tmp[1]);
		List<Character> list = new LinkedList<Character>();

		while(n > 0) {

			list.add((char) (n % k));
			n /= k;

		}



		System.out.println(list.size());

	}
} public class Main{
	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		String[] tmp = scanner.nextLine().split(" ");
		int n = Integer.parseInt(tmp[0]);
		int k = Integer.parseInt(tmp[1]);
		List<Character> list = new LinkedList<Character>();

		while(n > 0) {

			list.add((char) (n % k));
			n /= k;

		}



		System.out.println(list.size());

	}
} Main
import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;

public class Main{
	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		String[] tmp = scanner.nextLine().split(" ");
		int n = Integer.parseInt(tmp[0]);
		int k = Integer.parseInt(tmp[1]);
		List<Character> list = new LinkedList<Character>();

		while(n > 0) {

			list.add((char) (n % k));
			n /= k;

		}



		System.out.println(list.size());

	}
}