#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const long double PI = 3.1415926536;
void bye() {
  cout << "\n";
  exit(0);
}
void fnd(string &s) {
  int pnt = (int)(s).size() - 1;
  while (pnt >= 0 && s[pnt] == '9') {
    s[pnt--] = '0';
  }
  if (pnt >= 0) {
    s[pnt]++;
  } else {
    s = "1" + s;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, t;
  string s;
  cin >> n >> t;
  cin >> s;
  int pos = s.find('.');
  int ind = pos + 1;
  while (ind < (int)(s).size() && s[ind] < '5') {
    ind++;
  }
  if (ind >= (int)(s).size()) {
    cout << s.c_str();
  } else {
    int lst = (int)(s).size();
    while (ind > pos && s[ind] >= '5' && t) {
      if (ind - 1 == pos) {
        s = s.substr(0, pos);
        fnd(s);
        cout << s.substr().c_str();
        return 0;
      }
      s[ind - 1]++;
      for (int j = ind; j < lst; j++) {
        s[j] = '0';
      }
      lst = ind;
      ind--;
      t--;
    }
    lst = int((int)(s).size()) - 1;
    while (s[lst] == '0') {
      lst--;
    }
    cout << s.substr(0, lst + 1).c_str();
  }
  bye();
}
