#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
const int MOD = 1e9 + 7;
const int MAXN = 1e6 + 3;
long long f[1000000];
long long pow(int x) {
  if (f[x] != 0) {
    return f[x];
  } else if (x == 0) {
    return 1;
  } else if (x == 1) {
    return 2;
  } else {
    long long ans = pow(x / 2);
    ans *= ans;
    ans %= MOD;
    if (x % 2) {
      ans *= 2;
    }
    ans %= MOD;
    return ans;
  }
}
char c[2000009];
int main() {
  int n, t;
  cin >> n >> t;
  int count = n - 1, sz = -1;
  for (int i = 0; i < (n); ++i) {
    cin >> c[i];
    if (c[i] == '.') {
      sz = i;
    }
    if (c[i] >= '5' && t > 0 && sz != -1) {
      count = i;
      break;
    }
  }
  while (c[count] >= '5' && count > sz && t > 0) {
    t--;
    c[count] = '0';
    count--;
    if (count == sz) {
      count--;
    }
    while (c[count] == '9') {
      c[count] = '0';
      count--;
      if (count == -1) {
        cout << "1";
        for (int i = 0; i < (sz); ++i) {
          cout << "0";
        }
        return 0;
      }
      if (count == sz) {
        count--;
      }
    }
    c[count] = (char)((int)c[count] + 1);
  }
  for (int i = 0; i < (max(count + 1, sz)); ++i) {
    cout << c[i];
  }
  return 0;
}
