#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t;
  string s;
  cin >> n >> t;
  cin >> s;
  vector<int> a;
  vector<int> b;
  long long INF = 1e10;
  int q = 0;
  while (s[q] != '.') a.push_back((int)(s[q++] - '0'));
  q++;
  while (q < n) b.push_back((int)(s[q++] - '0'));
  bool f = true;
  int l = b.size();
  vector<long long> times(l + 1, 0);
  times[l] = INF;
  for (int i = l - 1; i >= 0; i--) {
    if (b[i] > 4)
      times[i] = 1;
    else if (b[i] == 4)
      times[i] = times[i + 1] + 1;
    else if (b[i] < 4)
      times[i] = INF;
  }
  int after = -1;
  for (int i = 0; i < l; i++) {
    if (times[i] <= t) {
      after = i;
      break;
    }
  }
  if (after == -1) {
    for (int i = 0; i < a.size(); i++) cout << a[i];
    cout << ".";
    for (int i = 0; i < b.size(); i++) cout << b[i];
  } else if (after == 0) {
    a[a.size() - 1]++;
    for (int i = a.size() - 1; i >= 1; i--) {
      if (a[i] >= 10) {
        a[i] -= 10;
        a[i - 1]++;
      } else
        break;
    }
    for (int i = 0; i < a.size(); i++) cout << a[i];
  } else {
    for (int i = 0; i < a.size(); i++) cout << a[i];
    cout << ".";
    b[after - 1]++;
    for (int i = 0; i < after; i++) cout << b[i];
  }
}
