#include <bits/stdc++.h>
using namespace std;
void inc(vector<int> &a) {
  reverse((a).begin(), (a).end());
  a[0]++;
  for (int i = 0, n = (int)(a).size();; i++)
    if (a[i] > 9) {
      a[i] %= 10;
      if (i == n - 1) a.push_back(0);
      a[i + 1]++;
    } else
      break;
  reverse((a).begin(), (a).end());
}
int main() {
  ios_base::sync_with_stdio(0);
  int n, t;
  cin >> n >> t;
  vector<int> l, r;
  bool pt = false;
  for (int i = 0; i < n; i++) {
    char c;
    cin >> c;
    if (c == '.')
      pt = true;
    else if (pt)
      r.push_back(c - '0');
    else
      l.push_back(c - '0');
  }
  int ls = (int)(l).size(), rs = (int)(r).size();
  for (int i = 0; i < rs; i++)
    if (r[i] > 4) {
      while (t > 0 && r[i] > 4) {
        t--;
        if (i == 0) {
          inc(l);
          for (int d : l) cout << d;
          return 0;
        }
        i--;
        r[i]++;
      }
      while (r[i] == 10) {
        if (i == 0) {
          inc(l);
          for (int d : l) cout << d;
          return 0;
        }
        i--;
        r[i]++;
      }
      for (int j = 0; j < ls; j++) cout << l[j];
      cout << '.';
      for (int j = 0; j <= i; j++) cout << r[j];
      return 0;
    }
  for (int i = 0; i < ls; i++) cout << l[i];
  cout << '.';
  for (int i = 0; i < rs; i++) cout << r[i];
}
