#include <bits/stdc++.h>
using namespace std;
int main() {
  long long i, k, pos, n, t, p, ans;
  std::ios::sync_with_stdio(false);
  while (cin >> n >> t) {
    string s;
    cin >> s;
    bool change = false;
    bool decimal = false;
    long long dot = -1, last;
    for (i = 0; i < n; i++) {
      if (s[i] == '.')
        dot = i;
      else if (dot != -1 && s[i] >= '5') {
        last = i;
        change = true;
        break;
      }
    }
    if (change == false) {
      cout << s << endl;
    } else {
      while (t) {
        t--;
        if (last - 1 == dot) {
          decimal = true;
          last = last - 2;
          break;
        }
        last--;
        s[last]++;
        if (s[last] < '5') break;
      }
      if (decimal) {
        for (k = dot - 1; k >= 0; k--) {
          if (s[k] == '9')
            s[k] = '0';
          else {
            s[k]++;
            break;
          }
        }
        if (k < 0) cout << 1;
        for (i = 0; i < dot; i++) cout << s[i];
      } else {
        for (i = 0; i <= last; i++) cout << s[i];
      }
      cout << endl;
    }
  }
  return 0;
}
