#include
using namespace std;
int main(){
int n;
int p;
cin>>n>>p;
float inc=1.0;
float N = 0;
for (int times=0; times<=p; times++){
for(float N=0; N*N<=n; N++){
N = N + inc;
}
N = N - inc;
inc = inc/10;
}
cout<<N<<endl;
return 0;
}