import java.util.Scanner;
public class Main{
 public static void main(String args[]){
  boolean flag=false;
  Scanner scan=new Scanner(System.in);
  String s;

  s=scan.next();
  long a=Long.parseLong(s);
  s=scan.next();
  long n=Long.parseLong(s);

  long ans=1;
  while(a/n>0){
   ans++;
   a/=n;
  }
  System.out.println(ans);
 }

 ///////////////////////////////////////////////
 public static boolean prime(long a){
  if(a<=1)return false;
  for(int i=2;i*i<=a;i++){
   if(a%i==0)return false;
  }
  return true;
 }
 public static long llpow(long x,long n){
  long ans=1;
  for(int i=0;i<n;i++)ans*=x;
  return ans;
 }
 public static long max(long a,long b){
  if(a<b)return b;
  else return a;
 }
 public static long min(long a,long b){
  if(a>b)return b;
  else return a;
 }
 public static long cei(long x,long y){
  long ans=x/y;
  if(x%y!=0)ans++;
  return ans;
 }
 public static long gcd(long x,long y){
  return (y==1)?gcd(y,x%y):x;
 }
 public static long lcm(long x,long y){
  return x/gcd(x,y)*y;
 }
 public static long fact(long x){
  long ans=1;
  for(int i=0;i<x;i++)ans*=(x-i);
  return ans;
 }
 public static long ncr(long n,long r){
  long ans=1,l=2;
  for(int i=0;i<min(n-r,r);i++){
   ans*=(n-i);
   while(ans%l==0&&l<=min(r,n-r)){
    ans/=l;l++;
   }
  }
  return ans;
 }
 public static long npr(long n,long r){
  long ans=1;
  for(int i=0;i<r;i++)ans*=(n-i);
  return ans; 
 }
 public static long fib(int x){
  long fibo[]=new long[x+10];
  fibo[0]=1;fibo[1]=1;
  for(int i=2;i<x+1;i++)fibo[i]=fibo[i-1]+fibo[i-2];
  return fibo[x];
 }
 public static long dig(long n){
  long d=1,tmp=n;
  while(tmp/10>0){
   tmp/=10;d++;
  }
  return d;}
}
 import java.util.Scanner; Scanner java.util public class Main{
 public static void main(String args[]){
  boolean flag=false;
  Scanner scan=new Scanner(System.in);
  String s;

  s=scan.next();
  long a=Long.parseLong(s);
  s=scan.next();
  long n=Long.parseLong(s);

  long ans=1;
  while(a/n>0){
   ans++;
   a/=n;
  }
  System.out.println(ans);
 }

 ///////////////////////////////////////////////
 public static boolean prime(long a){
  if(a<=1)return false;
  for(int i=2;i*i<=a;i++){
   if(a%i==0)return false;
  }
  return true;
 }
 public static long llpow(long x,long n){
  long ans=1;
  for(int i=0;i<n;i++)ans*=x;
  return ans;
 }
 public static long max(long a,long b){
  if(a<b)return b;
  else return a;
 }
 public static long min(long a,long b){
  if(a>b)return b;
  else return a;
 }
 public static long cei(long x,long y){
  long ans=x/y;
  if(x%y!=0)ans++;
  return ans;
 }
 public static long gcd(long x,long y){
  return (y==1)?gcd(y,x%y):x;
 }
 public static long lcm(long x,long y){
  return x/gcd(x,y)*y;
 }
 public static long fact(long x){
  long ans=1;
  for(int i=0;i<x;i++)ans*=(x-i);
  return ans;
 }
 public static long ncr(long n,long r){
  long ans=1,l=2;
  for(int i=0;i<min(n-r,r);i++){
   ans*=(n-i);
   while(ans%l==0&&l<=min(r,n-r)){
    ans/=l;l++;
   }
  }
  return ans;
 }
 public static long npr(long n,long r){
  long ans=1;
  for(int i=0;i<r;i++)ans*=(n-i);
  return ans; 
 }
 public static long fib(int x){
  long fibo[]=new long[x+10];
  fibo[0]=1;fibo[1]=1;
  for(int i=2;i<x+1;i++)fibo[i]=fibo[i-1]+fibo[i-2];
  return fibo[x];
 }
 public static long dig(long n){
  long d=1,tmp=n;
  while(tmp/10>0){
   tmp/=10;d++;
  }
  return d;}
} Main public static void main(String args[]){
  boolean flag=false;
  Scanner scan=new Scanner(System.in);
  String s;

  s=scan.next();
  long a=Long.parseLong(s);
  s=scan.next();
  long n=Long.parseLong(s);

  long ans=1;
  while(a/n>0){
   ans++;
   a/=n;
  }
  System.out.println(ans);
 } main {
  boolean flag=false;
  Scanner scan=new Scanner(System.in);
  String s;

  s=scan.next();
  long a=Long.parseLong(s);
  s=scan.next();
  long n=Long.parseLong(s);

  long ans=1;
  while(a/n>0){
   ans++;
   a/=n;
  }
  System.out.println(ans);
 } boolean flag=false; flag false Scanner scan=new Scanner(System.in); scan new Scanner(System.in) String s; s s=scan.next() s scan.next() scan.next scan long a=Long.parseLong(s); a Long.parseLong(s) Long.parseLong Long s s=scan.next() s scan.next() scan.next scan long n=Long.parseLong(s); n Long.parseLong(s) Long.parseLong Long s long ans=1; ans 1 while(a/n>0){
   ans++;
   a/=n;
  } a/n>0 a/n a n 0 {
   ans++;
   a/=n;
  } ans++ ans a/=n a n System.out.println(ans) System.out.println System.out System System.out ans String args[] args ///////////////////////////////////////////////
 public static boolean prime(long a){
  if(a<=1)return false;
  for(int i=2;i*i<=a;i++){
   if(a%i==0)return false;
  }
  return true;
 } prime {
  if(a<=1)return false;
  for(int i=2;i*i<=a;i++){
   if(a%i==0)return false;
  }
  return true;
 } if(a<=1)return false; a<=1 a 1 return false; false for(int i=2;i*i<=a;i++){
   if(a%i==0)return false;
  } int i=2; int i=2; i 2 i*i<=a i*i i i a i++ i++ i {
   if(a%i==0)return false;
  } {
   if(a%i==0)return false;
  } if(a%i==0)return false; a%i==0 a%i a i 0 return false; false return true; true long a a public static long llpow(long x,long n){
  long ans=1;
  for(int i=0;i<n;i++)ans*=x;
  return ans;
 } llpow {
  long ans=1;
  for(int i=0;i<n;i++)ans*=x;
  return ans;
 } long ans=1; ans 1 for(int i=0;i<n;i++)ans*=x; int i=0; int i=0; i 0 i<n i n i++ i++ i ans*=x; ans*=x ans x return ans; ans long x x long n n public static long max(long a,long b){
  if(a<b)return b;
  else return a;
 } max {
  if(a<b)return b;
  else return a;
 } if(a<b)return b;
  else return a; a<b a b return b; b return a; a long a a long b b public static long min(long a,long b){
  if(a>b)return b;
  else return a;
 } min {
  if(a>b)return b;
  else return a;
 } if(a>b)return b;
  else return a; a>b a b return b; b return a; a long a a long b b public static long cei(long x,long y){
  long ans=x/y;
  if(x%y!=0)ans++;
  return ans;
 } cei {
  long ans=x/y;
  if(x%y!=0)ans++;
  return ans;
 } long ans=x/y; ans x/y x y if(x%y!=0)ans++; x%y!=0 x%y x y 0 ans++ ans return ans; ans long x x long y y public static long gcd(long x,long y){
  return (y==1)?gcd(y,x%y):x;
 } gcd {
  return (y==1)?gcd(y,x%y):x;
 } return (y==1)?gcd(y,x%y):x; (y==1)?gcd(y,x%y):x (y==1) y 1 gcd(y,x%y) gcd y x%y x y x long x x long y y public static long lcm(long x,long y){
  return x/gcd(x,y)*y;
 } lcm {
  return x/gcd(x,y)*y;
 } return x/gcd(x,y)*y; x/gcd(x,y)*y x/gcd(x,y) x gcd(x,y) gcd x y y long x x long y y public static long fact(long x){
  long ans=1;
  for(int i=0;i<x;i++)ans*=(x-i);
  return ans;
 } fact {
  long ans=1;
  for(int i=0;i<x;i++)ans*=(x-i);
  return ans;
 } long ans=1; ans 1 for(int i=0;i<x;i++)ans*=(x-i); int i=0; int i=0; i 0 i<x i x i++ i++ i ans*=(x-i); ans*=(x-i) ans (x-i) x i return ans; ans long x x public static long ncr(long n,long r){
  long ans=1,l=2;
  for(int i=0;i<min(n-r,r);i++){
   ans*=(n-i);
   while(ans%l==0&&l<=min(r,n-r)){
    ans/=l;l++;
   }
  }
  return ans;
 } ncr {
  long ans=1,l=2;
  for(int i=0;i<min(n-r,r);i++){
   ans*=(n-i);
   while(ans%l==0&&l<=min(r,n-r)){
    ans/=l;l++;
   }
  }
  return ans;
 } long ans=1 ans 1 l=2; l 2 for(int i=0;i<min(n-r,r);i++){
   ans*=(n-i);
   while(ans%l==0&&l<=min(r,n-r)){
    ans/=l;l++;
   }
  } int i=0; int i=0; i 0 i<min(n-r,r) i min(n-r,r) min n-r n r r i++ i++ i {
   ans*=(n-i);
   while(ans%l==0&&l<=min(r,n-r)){
    ans/=l;l++;
   }
  } {
   ans*=(n-i);
   while(ans%l==0&&l<=min(r,n-r)){
    ans/=l;l++;
   }
  } ans*=(n-i) ans (n-i) n i while(ans%l==0&&l<=min(r,n-r)){
    ans/=l;l++;
   } ans%l==0&&l<=min(r,n-r) ans%l==0 ans%l ans l 0 l<=min(r,n-r) l min(r,n-r) min r n-r n r {
    ans/=l;l++;
   } ans/=l ans l l++ l return ans; ans long n n long r r public static long npr(long n,long r){
  long ans=1;
  for(int i=0;i<r;i++)ans*=(n-i);
  return ans; 
 } npr {
  long ans=1;
  for(int i=0;i<r;i++)ans*=(n-i);
  return ans; 
 } long ans=1; ans 1 for(int i=0;i<r;i++)ans*=(n-i); int i=0; int i=0; i 0 i<r i r i++ i++ i ans*=(n-i); ans*=(n-i) ans (n-i) n i return ans; ans long n n long r r public static long fib(int x){
  long fibo[]=new long[x+10];
  fibo[0]=1;fibo[1]=1;
  for(int i=2;i<x+1;i++)fibo[i]=fibo[i-1]+fibo[i-2];
  return fibo[x];
 } fib {
  long fibo[]=new long[x+10];
  fibo[0]=1;fibo[1]=1;
  for(int i=2;i<x+1;i++)fibo[i]=fibo[i-1]+fibo[i-2];
  return fibo[x];
 } long fibo[]=new long[x+10]; fibo new long[x+10] x+10 x 10 fibo[0]=1 fibo[0] fibo 0 1 fibo[1]=1 fibo[1] fibo 1 1 for(int i=2;i<x+1;i++)fibo[i]=fibo[i-1]+fibo[i-2]; int i=2; int i=2; i 2 i<x+1 i x+1 x 1 i++ i++ i fibo[i]=fibo[i-1]+fibo[i-2]; fibo[i]=fibo[i-1]+fibo[i-2] fibo[i] fibo i fibo[i-1]+fibo[i-2] fibo[i-1] fibo i-1 i 1 fibo[i-2] fibo i-2 i 2 return fibo[x]; fibo[x] fibo x int x x public static long dig(long n){
  long d=1,tmp=n;
  while(tmp/10>0){
   tmp/=10;d++;
  }
  return d;} dig {
  long d=1,tmp=n;
  while(tmp/10>0){
   tmp/=10;d++;
  }
  return d;} long d=1 d 1 tmp=n; tmp n while(tmp/10>0){
   tmp/=10;d++;
  } tmp/10>0 tmp/10 tmp 10 0 {
   tmp/=10;d++;
  } tmp/=10 tmp 10 d++ d return d; d long n n public class Main{
 public static void main(String args[]){
  boolean flag=false;
  Scanner scan=new Scanner(System.in);
  String s;

  s=scan.next();
  long a=Long.parseLong(s);
  s=scan.next();
  long n=Long.parseLong(s);

  long ans=1;
  while(a/n>0){
   ans++;
   a/=n;
  }
  System.out.println(ans);
 }

 ///////////////////////////////////////////////
 public static boolean prime(long a){
  if(a<=1)return false;
  for(int i=2;i*i<=a;i++){
   if(a%i==0)return false;
  }
  return true;
 }
 public static long llpow(long x,long n){
  long ans=1;
  for(int i=0;i<n;i++)ans*=x;
  return ans;
 }
 public static long max(long a,long b){
  if(a<b)return b;
  else return a;
 }
 public static long min(long a,long b){
  if(a>b)return b;
  else return a;
 }
 public static long cei(long x,long y){
  long ans=x/y;
  if(x%y!=0)ans++;
  return ans;
 }
 public static long gcd(long x,long y){
  return (y==1)?gcd(y,x%y):x;
 }
 public static long lcm(long x,long y){
  return x/gcd(x,y)*y;
 }
 public static long fact(long x){
  long ans=1;
  for(int i=0;i<x;i++)ans*=(x-i);
  return ans;
 }
 public static long ncr(long n,long r){
  long ans=1,l=2;
  for(int i=0;i<min(n-r,r);i++){
   ans*=(n-i);
   while(ans%l==0&&l<=min(r,n-r)){
    ans/=l;l++;
   }
  }
  return ans;
 }
 public static long npr(long n,long r){
  long ans=1;
  for(int i=0;i<r;i++)ans*=(n-i);
  return ans; 
 }
 public static long fib(int x){
  long fibo[]=new long[x+10];
  fibo[0]=1;fibo[1]=1;
  for(int i=2;i<x+1;i++)fibo[i]=fibo[i-1]+fibo[i-2];
  return fibo[x];
 }
 public static long dig(long n){
  long d=1,tmp=n;
  while(tmp/10>0){
   tmp/=10;d++;
  }
  return d;}
} public class Main{
 public static void main(String args[]){
  boolean flag=false;
  Scanner scan=new Scanner(System.in);
  String s;

  s=scan.next();
  long a=Long.parseLong(s);
  s=scan.next();
  long n=Long.parseLong(s);

  long ans=1;
  while(a/n>0){
   ans++;
   a/=n;
  }
  System.out.println(ans);
 }

 ///////////////////////////////////////////////
 public static boolean prime(long a){
  if(a<=1)return false;
  for(int i=2;i*i<=a;i++){
   if(a%i==0)return false;
  }
  return true;
 }
 public static long llpow(long x,long n){
  long ans=1;
  for(int i=0;i<n;i++)ans*=x;
  return ans;
 }
 public static long max(long a,long b){
  if(a<b)return b;
  else return a;
 }
 public static long min(long a,long b){
  if(a>b)return b;
  else return a;
 }
 public static long cei(long x,long y){
  long ans=x/y;
  if(x%y!=0)ans++;
  return ans;
 }
 public static long gcd(long x,long y){
  return (y==1)?gcd(y,x%y):x;
 }
 public static long lcm(long x,long y){
  return x/gcd(x,y)*y;
 }
 public static long fact(long x){
  long ans=1;
  for(int i=0;i<x;i++)ans*=(x-i);
  return ans;
 }
 public static long ncr(long n,long r){
  long ans=1,l=2;
  for(int i=0;i<min(n-r,r);i++){
   ans*=(n-i);
   while(ans%l==0&&l<=min(r,n-r)){
    ans/=l;l++;
   }
  }
  return ans;
 }
 public static long npr(long n,long r){
  long ans=1;
  for(int i=0;i<r;i++)ans*=(n-i);
  return ans; 
 }
 public static long fib(int x){
  long fibo[]=new long[x+10];
  fibo[0]=1;fibo[1]=1;
  for(int i=2;i<x+1;i++)fibo[i]=fibo[i-1]+fibo[i-2];
  return fibo[x];
 }
 public static long dig(long n){
  long d=1,tmp=n;
  while(tmp/10>0){
   tmp/=10;d++;
  }
  return d;}
} Main
import java.util.Scanner;
public class Main{
 public static void main(String args[]){
  boolean flag=false;
  Scanner scan=new Scanner(System.in);
  String s;

  s=scan.next();
  long a=Long.parseLong(s);
  s=scan.next();
  long n=Long.parseLong(s);

  long ans=1;
  while(a/n>0){
   ans++;
   a/=n;
  }
  System.out.println(ans);
 }

 ///////////////////////////////////////////////
 public static boolean prime(long a){
  if(a<=1)return false;
  for(int i=2;i*i<=a;i++){
   if(a%i==0)return false;
  }
  return true;
 }
 public static long llpow(long x,long n){
  long ans=1;
  for(int i=0;i<n;i++)ans*=x;
  return ans;
 }
 public static long max(long a,long b){
  if(a<b)return b;
  else return a;
 }
 public static long min(long a,long b){
  if(a>b)return b;
  else return a;
 }
 public static long cei(long x,long y){
  long ans=x/y;
  if(x%y!=0)ans++;
  return ans;
 }
 public static long gcd(long x,long y){
  return (y==1)?gcd(y,x%y):x;
 }
 public static long lcm(long x,long y){
  return x/gcd(x,y)*y;
 }
 public static long fact(long x){
  long ans=1;
  for(int i=0;i<x;i++)ans*=(x-i);
  return ans;
 }
 public static long ncr(long n,long r){
  long ans=1,l=2;
  for(int i=0;i<min(n-r,r);i++){
   ans*=(n-i);
   while(ans%l==0&&l<=min(r,n-r)){
    ans/=l;l++;
   }
  }
  return ans;
 }
 public static long npr(long n,long r){
  long ans=1;
  for(int i=0;i<r;i++)ans*=(n-i);
  return ans; 
 }
 public static long fib(int x){
  long fibo[]=new long[x+10];
  fibo[0]=1;fibo[1]=1;
  for(int i=2;i<x+1;i++)fibo[i]=fibo[i-1]+fibo[i-2];
  return fibo[x];
 }
 public static long dig(long n){
  long d=1,tmp=n;
  while(tmp/10>0){
   tmp/=10;d++;
  }
  return d;}
}

