#include <bits/stdc++.h>
using namespace std;
const long long OO = (long long)1e14 + 7;
const int MX = (int)1e3 + 7;
const int mod = (int)1e9 + 7;
int main(void) {
  ios_base::sync_with_stdio(false);
  int n, t;
  string s;
  while (cin >> n >> t >> s) {
    int dot = -1;
    for (int i = 0; i < n; i++) {
      if (s[i] == '.') dot = i;
    }
    if (dot == -1) {
      cout << s << "\n";
      continue;
    }
    int ad = 0;
    for (int i = dot + 1; dot < n; i++) {
      if (s[i] - '0' >= 5) {
        for (int j = i + 1; j < n; j++) {
          s[j] = '*';
        }
        int cur = s[i] - '0';
        while (cur >= 5) {
          t--;
          s[i] = '*';
          i--;
          if (s[i] == '.') {
            s[i] = '*';
            i--;
            cur = (int)(s[i] - '0');
            if (cur == 9) {
              while (cur == 9) {
                s[i] = '0';
                i--;
                if (i < 0) {
                  ad = 1;
                  goto A;
                }
                cur = (int)(s[i] - '0');
              }
              s[i]++;
            } else {
              s[i]++;
            }
            goto A;
          } else {
            s[i]++;
            cur = (int)(s[i] - '0');
          }
          if (!t) break;
        }
        break;
      }
    }
  A:
    if (ad) {
      cout << "1";
    }
    for (int i = 0; i < n; i++) {
      if (s[i] != '*') cout << s[i];
    }
    cout << "\n";
  }
  return 0;
}
