import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);

    	try {
    		final int N = sc.nextInt();
    		final int K = sc.nextInt();

    		System.out.println(Integer.toString(N, K).length());

    	} finally {
    		sc.close();
    	}
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);

    	try {
    		final int N = sc.nextInt();
    		final int K = sc.nextInt();

    		System.out.println(Integer.toString(N, K).length());

    	} finally {
    		sc.close();
    	}
    }
} Main public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);

    	try {
    		final int N = sc.nextInt();
    		final int K = sc.nextInt();

    		System.out.println(Integer.toString(N, K).length());

    	} finally {
    		sc.close();
    	}
    } main {
    	Scanner sc = new Scanner(System.in);

    	try {
    		final int N = sc.nextInt();
    		final int K = sc.nextInt();

    		System.out.println(Integer.toString(N, K).length());

    	} finally {
    		sc.close();
    	}
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) try {
    		final int N = sc.nextInt();
    		final int K = sc.nextInt();

    		System.out.println(Integer.toString(N, K).length());

    	} finally {
    		sc.close();
    	} {
    		sc.close();
    	} sc.close() sc.close sc {
    		final int N = sc.nextInt();
    		final int K = sc.nextInt();

    		System.out.println(Integer.toString(N, K).length());

    	} final int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc final int K = sc.nextInt(); K sc.nextInt() sc.nextInt sc System.out.println(Integer.toString(N, K).length()) System.out.println System.out System System.out Integer.toString(N, K).length() Integer.toString(N, K).length Integer.toString(N, K) Integer.toString Integer N K String[] args args public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);

    	try {
    		final int N = sc.nextInt();
    		final int K = sc.nextInt();

    		System.out.println(Integer.toString(N, K).length());

    	} finally {
    		sc.close();
    	}
    }
} public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);

    	try {
    		final int N = sc.nextInt();
    		final int K = sc.nextInt();

    		System.out.println(Integer.toString(N, K).length());

    	} finally {
    		sc.close();
    	}
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);

    	try {
    		final int N = sc.nextInt();
    		final int K = sc.nextInt();

    		System.out.println(Integer.toString(N, K).length());

    	} finally {
    		sc.close();
    	}
    }
}
