#include <bits/stdc++.h>
const long long mod = 1000000007;
const long long Inf = 1e9;
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int n, t;
  cin >> n >> t;
  int ans = 0;
  vector<char> s(n);
  int pos;
  for (int(i) = 0; (i) < n; (i)++) {
    cin >> s[i];
    if (s[i] == '.') pos = i;
  }
  if (s[pos + 1] >= '5') {
    for (int i = pos - 1; i >= 0; i--) {
      if (s[i] == '9') {
        s[i] = '0';
      } else {
        s[i] = s[i] + 1;
        break;
      }
    }
    if (s[0] == '0') cout << 1;
    for (int(i) = 0; (i) < pos; (i)++) cout << s[i];
    return 0;
  }
  int count = 0, ppos = 0;
  for (int(i) = pos + 1; (i) < n; (i)++) {
    if (s[i] >= '4') count++;
    if (s[i] >= '5') {
      ppos = max(pos + 1, i - min(count, t));
      s[ppos] += 1;
      t -= i - ppos;
      break;
    }
    if (s[i] < '4') count = 0;
  }
  if (s[pos + 1] >= '5' && t > 0) {
    for (int i = pos - 1; i >= 0; i--) {
      if (s[i] == '9') {
        s[i] = '0';
      } else {
        s[i] = s[i] + 1;
        break;
      }
    }
    if (s[0] == '0') cout << 1;
    for (int(i) = 0; (i) < pos; (i)++) cout << s[i];
  } else {
    if (ppos != 0)
      for (int(i) = 0; (i) < ppos + 1; (i)++) cout << s[i];
    else {
      for (int(i) = 0; (i) < n; (i)++) cout << s[i];
    }
  }
  return 0;
}
