#include <bits/stdc++.h>
using namespace std;
int n;
int t;
deque<int> dq;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> t;
  string s;
  cin >> s;
  bool b = false;
  int id = 0, p;
  for (int i = 0; i < (int)s.size(); i++) {
    if (s[i] == '.') b = true, p = i;
    id++;
    if (b && (s[i] - '0') > 4) break;
  }
  if (!b) {
    cout << s;
    return 0;
  }
  for (int i = p + 1; i < id; i++) {
    dq.push_back(s[i] - '0');
  }
  int k = 0;
  while (!dq.empty() && dq.back() > 4) {
    if (dq.back() != 10) {
      if (!t) break;
      t--;
    }
    if ((int)dq.size() == 1) {
      k = 1;
      dq.pop_back();
    } else {
      dq.pop_back();
      dq.back()++;
    }
  }
  if (k) {
    if (s[p - 1] - '0' < 9) {
      for (int i = 0; i < p - 1; i++) {
        cout << s[i];
      }
      cout << (s[p - 1] - '0') + 1;
    } else {
      int pp = -1;
      for (int i = p - 1; i >= 0; i--) {
        if (s[i] != '9') {
          pp = i;
          break;
        }
      }
      if (pp == -1) {
        cout << 1;
        for (int i = 0; i <= p - 1; i++) {
          cout << 0;
        }
      } else {
        for (int i = 0; i < pp; i++) {
          cout << s[i];
        }
        cout << ((s[pp] - '0') + 1);
        for (int i = pp + 1; i < p; i++) {
          cout << 0;
        }
      }
    }
  } else {
    for (int i = 0; i < p; i++) {
      cout << s[i];
    }
  }
  if (!dq.empty()) cout << '.';
  while (!dq.empty()) {
    cout << dq.front();
    dq.pop_front();
  }
  return 0;
}
