#include <bits/stdc++.h>
using namespace std;
string itos(long long num) {
  ostringstream str1;
  str1 << num;
  string geek = str1.str();
  return geek;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, t;
  cin >> n >> t;
  string s;
  cin >> s;
  long long i;
  vector<long long> v, num, a;
  long long flag = 0, f = 0, f1 = 0;
  for (i = 0; i < n; i++) {
    if (s[i] == '.') {
      flag = 1;
      continue;
    }
    if (!flag)
      num.push_back(s[i] - '0');
    else
      v.push_back(s[i] - '0');
  }
  long long len = v.size();
  for (i = 0; i < len; i++) {
    if (v[i] < 5)
      a.push_back(5 - v[i]);
    else {
      a.push_back(0);
      break;
    }
  }
  for (i = a.size() - 1; i >= 0 && t > 0; i--, t--) {
    if (a[i] == 0)
      a[i] -= 1;
    else {
      a[i]--;
      f1 = 1;
      break;
    }
    if (i > 0) a[i - 1]--;
  }
  if (a[0] == -1) {
    for (i = num.size() - 1; i >= 0; i--) {
      if (num[i] == 9)
        num[i] = 0;
      else {
        num[i]++;
        goto x;
      }
    }
    num.insert(num.begin(), 1);
  }
x:
  string ans;
  for (i = 0; i < num.size(); i++) {
    ans += itos(num[i]);
  }
  ans += '.';
  for (i = 0; i < a.size() && a[i] != -1; i++) {
    f = 1;
    ans += itos(5 - a[i]);
  }
  if (f == 0)
    ans.pop_back();
  else if (f1 == 1)
    ans[ans.length() - 1]--;
  cout << ans << endl;
}
