#include <iostream>
#include <cstdlib>
#include <string>
#include <math.h>
#include <vector>

using namespace std;


int pot ( int k )
{
    int tmp = 1;
    for ( int i = 0; i < k; ++i )
        tmp *= 10;
    return tmp;
}


int main ( void )
{
    int x;
    int k;
    
    cin >> x >> k;
    
    int tmp = x % pot ( k );
    
    x = x / pot ( k );
    x *= pot ( k );
    
    if ( tmp >= pot ( k ) / 2 ) x += pot ( k );
    
    cout << x << endl;

     //system ( "pause" );
     return 0;
}
     
