#include <bits/stdc++.h>
using namespace std;
string s;
void printSolveAddOne() {
  string num;
  for (int i = 0; s[i] != '.'; i++) {
    num += s[i];
  }
  int it = num.size() - 1;
  for (; it >= 0; it--) {
    if (num[it] < '9') {
      num[it]++;
      break;
    } else {
      num[it] = '0';
      if (it == 0) {
        num = "1" + num;
      }
    }
  }
  cout << num;
}
int main(int nargs, char **args) {
  int n, k;
  cin >> n >> k;
  cin >> s;
  bool inDecimal = false;
  int it = 0;
  for (; it < n;) {
    if (s[it] == '.') {
      inDecimal = true;
      it++;
      continue;
    }
    if (!inDecimal) {
      it++;
      continue;
    }
    if (s[it] >= '5' && k) {
      if (s[it - 1] == '.') {
        printSolveAddOne();
        return 0;
      } else {
        s[it - 1]++;
      }
      k--;
      n = it;
      it--;
      continue;
    }
    it++;
  }
  cout << s.substr(0, n);
  return 0;
}
