#include <bits/stdc++.h>
using namespace std;
vector<string> split(const string& s, char c) {
  vector<string> v;
  stringstream ss(s);
  string x;
  while (getline(ss, x, c)) v.emplace_back(x);
  return move(v);
}
void err(vector<string>::iterator it) {}
template <typename T, typename... Args>
void err(vector<string>::iterator it, T a, Args... args) {
  cerr << it->substr((*it)[0] == ' ', it->length()) << " = " << a << '\n';
  err(++it, args...);
}
const int mx = (int)1e5 + 5;
int main(int argc, char const* argv[]) {
  int n, t, m, i, j, k, d, l;
  cin >> n >> t;
  string s;
  cin >> s;
  for (i = 0; i < n; i++)
    if (s[i] == '.') break;
  d = i;
  j = n - 1;
  for (i = d + 1; i < n; i++) {
    if (s[i] - '0' >= 5) {
      for (j = i - 1; j > d && t; j--) {
        if (s[j + 1] - '0' >= 5) {
          s[j] = s[j] + 1;
          t--;
        } else {
          break;
        }
      }
      j++;
      if (j - 1 == d && t) {
        if (s[j] >= '5') {
          s[j - 2] += 1;
          j = d - 1;
        }
      }
      break;
    }
  }
  if (j == d - 1) {
    while (j >= 0 && s[j] == '9' + 1) {
      s[j] = '0';
      if (j > 0) s[j - 1] += 1;
      j--;
    }
    if (s[0] == '0') {
      cout << '1';
      s[0] = '0';
    }
    j = d - 1;
  }
  for (i = 0; i <= j; i++) printf("%c", s[i]);
  return 0;
}
