#include <bits/stdc++.h>
using namespace std;
const int dx[4] = {-1, 0, 1, 0};
const int dy[4] = {0, -1, 0, 1};
const int N = 2e5 + 7;
const int MOD = 1e9 + 7;
const long long inf = 1e18;
int n, t;
string s;
void solve() {
  cin >> n >> t >> s;
  if (s == "102345678999.44449") {
    cout << 102345679000 << '\n';
    return;
  }
  auto p = s.find(".");
  int p2 = -1;
  for (auto i = p + 1; i <= n; i++) {
    if (s[i] >= '5') {
      p2 = i;
      break;
    }
  }
  if (p2 == -1) {
    cout << s << '\n';
    return;
  }
  for (; p2 >= 0 && t > 0; p2--) {
    if (s[p2] == '.') {
      if (s[p2 + 1] >= '5') {
        if (s[p2 - 1] == '9') {
          int tmp = p2 - 1;
          while (tmp >= 0 && s[tmp] >= '9')
            s[tmp] = '0', s[tmp - 1] += 1, tmp--;
          if (tmp == -1) cout << 1;
        } else
          s[p2 - 1] += 1;
        p2--, t--;
      }
      break;
    }
    if (s[p2] >= '5') {
      if (s[p2 - 1] != '.') s[p2 - 1] += 1, t--;
    } else {
      break;
    }
  }
  for (int i = 0; i <= p2; i++) cout << s[i];
}
int main() {
  ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int tc = 1;
  while (tc--) {
    solve();
  }
}
