#include <bits/stdc++.h>
using namespace std;
int dotPos = 0;
int round(string& s, int pos) {
  if (s[pos] == '9') {
    s[pos] = '0';
    if (pos == 0) {
      s = "1" + s;
      ++dotPos;
      return 0;
    } else
      return round(s, pos - 1);
  } else if (s[pos] == '.')
    return round(s, pos - 1);
  else {
    s[pos] += 1;
    return pos;
  }
}
int main() {
  int n, t;
  cin >> n >> t;
  string s;
  cin >> s;
  for (; dotPos < n; ++dotPos)
    if (s[dotPos] == '.') break;
  int res = 0;
  int cnt4 = 0;
  for (int i = dotPos + 1; i < n; ++i) {
    if (s[i] >= '5') {
      res = i;
      break;
    }
  }
  if (res == 0) {
    cout << s << endl;
    return 0;
  }
  do {
    --res;
    res = round(s, res);
    --t;
  } while (res > dotPos && s[res] >= '5' && t > 0);
  if (res < dotPos) res = dotPos - 1;
  cout << s.substr(0, 1 + res) << endl;
  return 0;
}
