#include <bits/stdc++.h>
using namespace std;
int n, k, pp;
string s;
int carry = 0;
void inc(int it) {
  carry = 1;
  for (int i = it; i >= 0 && carry; --i) {
    if (s[i] == '.') continue;
    carry = 0;
    if (s[i] == '9') {
      s[i] = ('0' - 1);
      carry = 1;
    }
    s[i]++;
  }
}
int main() {
  scanf("%d%d", &n, &k);
  cin >> s;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '.') {
      pp = i;
      break;
    }
  }
  bool ok = false;
  int e = n - 1;
  while (k > 0) {
    ok = false;
    for (int i = pp + 1; i <= e; ++i) {
      if (s[i] >= '5') {
        e = i - 1;
        k--;
        while (k && s[e] == '4' && e) {
          e--;
          k--;
        }
        ok = true;
        inc(e);
        while (s[e] == '0') {
          e--;
        }
        break;
      }
    }
    if (!ok) break;
  }
  if (s[e] == '.') e--;
  if (carry) cout << carry;
  cout << s.substr(0, e + 1) << endl;
  return 0;
}
