import java.util.ArrayList;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		int n = 0;
		int k = 0;
		ArrayList<Integer> anser = new ArrayList<>();

		Scanner scan = new Scanner(System.in);

		n = scan.nextInt();
		k = scan.nextInt();

		while(n>=k) {
			anser.add(n%k);
			n=n/k;
		}

		if(n<k) {
			anser.add(n);
		}
		System.out.println(anser.size());
	}

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

	public static void main(String[] args) {

		int n = 0;
		int k = 0;
		ArrayList<Integer> anser = new ArrayList<>();

		Scanner scan = new Scanner(System.in);

		n = scan.nextInt();
		k = scan.nextInt();

		while(n>=k) {
			anser.add(n%k);
			n=n/k;
		}

		if(n<k) {
			anser.add(n);
		}
		System.out.println(anser.size());
	}

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

		int n = 0;
		int k = 0;
		ArrayList<Integer> anser = new ArrayList<>();

		Scanner scan = new Scanner(System.in);

		n = scan.nextInt();
		k = scan.nextInt();

		while(n>=k) {
			anser.add(n%k);
			n=n/k;
		}

		if(n<k) {
			anser.add(n);
		}
		System.out.println(anser.size());
	} main {

		int n = 0;
		int k = 0;
		ArrayList<Integer> anser = new ArrayList<>();

		Scanner scan = new Scanner(System.in);

		n = scan.nextInt();
		k = scan.nextInt();

		while(n>=k) {
			anser.add(n%k);
			n=n/k;
		}

		if(n<k) {
			anser.add(n);
		}
		System.out.println(anser.size());
	} int n = 0; n 0 int k = 0; k 0 ArrayList<Integer> anser = new ArrayList<>(); anser new ArrayList<>() Scanner scan = new Scanner(System.in); scan new Scanner(System.in) n = scan.nextInt() n scan.nextInt() scan.nextInt scan k = scan.nextInt() k scan.nextInt() scan.nextInt scan while(n>=k) {
			anser.add(n%k);
			n=n/k;
		} n>=k n k {
			anser.add(n%k);
			n=n/k;
		} anser.add(n%k) anser.add anser n%k n k n=n/k n n/k n k if(n<k) {
			anser.add(n);
		} n<k n k {
			anser.add(n);
		} anser.add(n) anser.add anser n System.out.println(anser.size()) System.out.println System.out System System.out anser.size() anser.size anser String[] args args public class Main {

	public static void main(String[] args) {

		int n = 0;
		int k = 0;
		ArrayList<Integer> anser = new ArrayList<>();

		Scanner scan = new Scanner(System.in);

		n = scan.nextInt();
		k = scan.nextInt();

		while(n>=k) {
			anser.add(n%k);
			n=n/k;
		}

		if(n<k) {
			anser.add(n);
		}
		System.out.println(anser.size());
	}

} public class Main {

	public static void main(String[] args) {

		int n = 0;
		int k = 0;
		ArrayList<Integer> anser = new ArrayList<>();

		Scanner scan = new Scanner(System.in);

		n = scan.nextInt();
		k = scan.nextInt();

		while(n>=k) {
			anser.add(n%k);
			n=n/k;
		}

		if(n<k) {
			anser.add(n);
		}
		System.out.println(anser.size());
	}

} Main
import java.util.ArrayList;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		int n = 0;
		int k = 0;
		ArrayList<Integer> anser = new ArrayList<>();

		Scanner scan = new Scanner(System.in);

		n = scan.nextInt();
		k = scan.nextInt();

		while(n>=k) {
			anser.add(n%k);
			n=n/k;
		}

		if(n<k) {
			anser.add(n);
		}
		System.out.println(anser.size());
	}

}
