#include <bits/stdc++.h>
using namespace std;
int ans[300000];
int main() {
  int n, t;
  cin >> n >> t;
  string s;
  cin >> s;
  int xx = -1, ix = -1;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '.')
      ix = i;
    else
      ans[i] = s[i] - '0';
    if (ix != -1 && s[i] >= '5') {
      xx = i;
      break;
    }
  }
  if (xx == -1) return cout << s, 0;
  int st = xx;
  for (int i = xx; i > ix; i--)
    if (ans[i] >= 5 && t) {
      if (i == ix + 1) ans[i - 2]++;
      ans[i - 1]++, t--, st--;
    }
  for (int i = ix - 1; i > 0; i--)
    ans[i - 1] += ans[i] / 10, ans[i] = ans[i] % 10;
  for (int i = 0; i < ix; i++) cout << ans[i];
  if (ix + 1 <= st) cout << '.';
  for (int i = ix + 1; i <= st; i++) cout << ans[i];
}
