import java.io.BufferedReader;
import java.io.*;
import java.util.*;
import java.util.stream.Collectors;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;

public class Main {
	public static void main(final String[] args){
    
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    int r = sc.nextInt();
    long r2 = r;
    int count = 1;
    boolean a = true;
    while(a==true){
        if(n >= r2){
            count++;
        }else{
            //count++;
            a = false;
        }
        r2 = r2 * r;
    }
    System.out.println(count);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.*; io.* java import java.util.*; util.* java import java.util.stream.Collectors; Collectors java.util.stream import java.util.ArrayList; ArrayList java.util import java.util.Iterator; Iterator java.util import java.util.List; List java.util import java.util.Collections; Collections java.util public class Main {
	public static void main(final String[] args){
    
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    int r = sc.nextInt();
    long r2 = r;
    int count = 1;
    boolean a = true;
    while(a==true){
        if(n >= r2){
            count++;
        }else{
            //count++;
            a = false;
        }
        r2 = r2 * r;
    }
    System.out.println(count);
    }
} Main public static void main(final String[] args){
    
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    int r = sc.nextInt();
    long r2 = r;
    int count = 1;
    boolean a = true;
    while(a==true){
        if(n >= r2){
            count++;
        }else{
            //count++;
            a = false;
        }
        r2 = r2 * r;
    }
    System.out.println(count);
    } main {
    
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    int r = sc.nextInt();
    long r2 = r;
    int count = 1;
    boolean a = true;
    while(a==true){
        if(n >= r2){
            count++;
        }else{
            //count++;
            a = false;
        }
        r2 = r2 * r;
    }
    System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc int r = sc.nextInt(); r sc.nextInt() sc.nextInt sc long r2 = r; r2 r int count = 1; count 1 boolean a = true; a true while(a==true){
        if(n >= r2){
            count++;
        }else{
            //count++;
            a = false;
        }
        r2 = r2 * r;
    } a==true a true {
        if(n >= r2){
            count++;
        }else{
            //count++;
            a = false;
        }
        r2 = r2 * r;
    } if(n >= r2){
            count++;
        }else{
            //count++;
            a = false;
        } n >= r2 n r2 {
            count++;
        } count++ count {
            //count++;
            a = false;
        } a = false a false r2 = r2 * r r2 r2 * r r2 r System.out.println(count) System.out.println System.out System System.out count final String[] args args public class Main {
	public static void main(final String[] args){
    
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    int r = sc.nextInt();
    long r2 = r;
    int count = 1;
    boolean a = true;
    while(a==true){
        if(n >= r2){
            count++;
        }else{
            //count++;
            a = false;
        }
        r2 = r2 * r;
    }
    System.out.println(count);
    }
} public class Main {
	public static void main(final String[] args){
    
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    int r = sc.nextInt();
    long r2 = r;
    int count = 1;
    boolean a = true;
    while(a==true){
        if(n >= r2){
            count++;
        }else{
            //count++;
            a = false;
        }
        r2 = r2 * r;
    }
    System.out.println(count);
    }
} Main
import java.io.BufferedReader;
import java.io.*;
import java.util.*;
import java.util.stream.Collectors;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;

public class Main {
	public static void main(final String[] args){
    
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    int r = sc.nextInt();
    long r2 = r;
    int count = 1;
    boolean a = true;
    while(a==true){
        if(n >= r2){
            count++;
        }else{
            //count++;
            a = false;
        }
        r2 = r2 * r;
    }
    System.out.println(count);
    }
}