#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>

using namespace std;

int c, k, p, x;

int main()
{
    int i;
    scanf("%d %d", &c, &k);
    for(i = 0, p = 1; i < k; ++i, p *= 10);
    c -= x = c % p;
    printf("%d\n", x < p / 2 ? c : c + p);
    return 0;
}
