#include <bits/stdc++.h>
using namespace std;
string s;
void add(int& x) {
  s[x] = '0';
  x--;
  while (x >= 0) {
    if (s[x] == '.') {
      x--;
      continue;
    }
    if (s[x] == '9')
      s[x] = '0';
    else
      break;
    x--;
  }
  if (x < 0)
    s = '1' + s;
  else
    s[x]++;
}
int main(int argc, char* argv[]) {
  if (argc == 2 or argc == 3) freopen(argv[1], "r", stdin);
  if (argc == 3) freopen(argv[2], "w", stdout);
  int n, t, m, x = -1, y;
  string s1;
  bool flag = false;
  cin >> n >> t;
  cin >> s;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '.') flag = true, y = i;
    if (flag and s[i] > '4') {
      x = i;
      for (int k = i + 1; k < n; ++k) s[k] = '0';
      break;
    }
  }
  m = min(t, n);
  for (int i = 0; x >= 0 and i < m; ++i) {
    if (x <= y) break;
    if (s[x] > '4') {
      add(x);
    }
  }
  s1 = "";
  flag = false;
  for (int i = n - 1; i >= 0; --i) {
    if (flag == false and s[i] == '.') {
      flag = true;
      continue;
    }
    if (s[i] != '0') flag = true;
    if (flag) s1 += s[i];
  }
  reverse(s1.begin(), s1.end());
  cout << s1 << endl;
  return 0;
}
