#include <iostream>
#include <cmath>

using namespace std;

int main() {
    int n, k;
    if (!(cin >> n >> k)) return 0;
    int cnt = log10(n)+1;
    // Using round to prevent floating-point precision issues
    int p = round(pow(10, cnt-k)); 
    
    int copy = n;
    int fd = copy % p;
    int p2 = round(pow(10, k)); 
    int num = fd * p2;
    int end = copy / p;
    
    // Output the result instead of returning it
    cout << num + end << endl;
    
    return 0;
}