#include <bits/stdc++.h>
using namespace std;
int n, m;
string s;
int main() {
  cin >> n >> m >> s;
  if (m == 0) {
    cout << s << "\n";
    return 0;
  }
  int vt;
  for (vt = 0; vt < n; ++vt)
    if (s[vt] == '.') break;
  if (vt >= n) {
    cout << s << "\n";
    return 0;
  }
  int i;
  for (i = vt + 1; i < n; ++i) {
    if (s[i] >= '5') break;
  }
  if (i >= n) {
    cout << s << "\n";
    return 0;
  }
  int j;
  for (j = i - 1; j >= 0; --j) {
    if (m == 0) {
      j++;
      break;
    }
    if (s[j] == '.') {
      j--;
      break;
    }
    m--;
    if (s[j] < '4') break;
  }
  if (s[j] != '.') {
    int k = j;
    while (k >= 0 && s[k] == '9') {
      s[k] = '0';
      k--;
    }
    if (k >= 0)
      s[k]++;
    else {
      s = "1" + s;
      j++;
      n++;
    }
  }
  if (j + 1 < n) s.erase(j + 1, n - 1 - j);
  if (s[s.length() - 1] == '.') s.erase(s.length() - 1, 1);
  cout << s << "\n";
}
