#include <bits/stdc++.h>
using namespace std;
inline bool ZXBs_fast_input(int& x) {
  x = 0;
  int c;
  int sign = 1;
  while ((c = getchar()) < '0' || c > '9')
    if (c == '-') sign = -1;
  x = c ^ '0';
  while ((c = getchar()) >= '0' && c <= '9')
    x = (x << 3) + (x << 1) + (c ^ '0');
  x *= sign;
  return 1;
}
inline bool ZXBs_fast_output(int x) {
  if (x >= 10) ZXBs_fast_output(x / 10);
  putchar(x % 10 + '0');
  return 1;
}
const int rp = 666666;
const bool debug = 1;
const bool I_good_vegetable_a = 1;
int n, t;
int pnt = 0;
string s;
signed main() {
  ios::sync_with_stdio(false);
  cin >> n >> t >> s;
  while (s[pnt] != '.') pnt++;
  int pos = -1;
  for (int i = pnt; i < n; i++) {
    if (s[i + 1] >= '5') {
      pos = i;
      break;
    }
  }
  if (pos == -1) {
    cout << s << endl;
  }
  t--;
  s[pos]++;
  while (pos > pnt && t > 0) {
    if (s[pos] == '5') {
      t--;
      s[pos - 1]++;
    } else
      break;
    pos--;
  }
  if (pos == pnt) {
    if (s[pnt - 1] == '9') {
      int i = pnt - 1;
      while (s[i] == '9' && i >= 0) {
        s[i] = '0';
        i--;
      }
      if (i >= 0) {
        s[i]++;
        cout << s.substr(0, pnt) << endl;
      } else {
        cout << "1" << s.substr(0, pnt) << endl;
      }
    } else {
      s[pnt - 1]++;
      cout << s.substr(0, pnt) << endl;
    }
    return 0;
  }
  cout << s.substr(0, pos + 1) << endl;
  return 0;
}
