#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t;
  cin >> n >> t;
  string s;
  cin >> s;
  int i = 0;
  while (i < n && s[i] != '.') ++i;
  while (i < n && s[i] < '5') ++i;
  if (i < n) {
    while (t--) {
      int l = i - 1;
      if (s[l] == '.') {
        i = l;
        ++s[--l];
        int carry = (s[l] > '9') ? 1 : 0;
        while (carry) carry = (l > 0 && ++s[--l] > '9') ? 1 : 0;
        if (s[0] > '9') {
          s = '1' + s;
          ++i;
        }
        while (l + 1 < i) s[++l] = '0';
        break;
      } else {
        ++s[l];
        int carry = (s[l] > '9') ? 1 : 0;
        while (carry) carry = (++s[--l] > '9') ? 1 : 0;
        if (s[l] == '.' + 1) {
          i = l;
          ++s[--l];
          while (carry) carry = (l > 0 && ++s[--l] > '9') ? 1 : 0;
          if (s[0] > '9') {
            s = '1' + s;
            ++i;
          }
          while (l + 1 < i) s[++l] = '0';
          break;
        } else if (s[l] >= '5' && t) {
          i = l;
        } else {
          break;
        }
      }
    }
    s.erase(s.begin() + i, s.end());
  }
  cout << s << endl;
  return 0;
}
