#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:99999999999")
int main() {
  long long n, t;
  cin >> n >> t;
  string s;
  cin >> s;
  s = "0" + s;
  n++;
  int pos = 0;
  int left = 0;
  while (s[pos] != '.') {
    pos++;
  }
  int cur = pos + 1;
  while (cur < n) {
    if (s[cur] >= '5') {
      break;
    }
    cur++;
  }
  string ans = s;
  int l = n;
  if (cur < n) {
    l = cur;
    if (cur - 1 == pos) {
      int cur2 = pos - 1;
      while (s[cur2] == '9') {
        ans[cur2] = '0';
        cur2--;
      }
      ans[cur2]++;
      if (ans[0] != '0') cout << ans[0];
      for (int i = 1; i < pos; i++) {
        cout << ans[i];
      }
    } else {
      while ((s[cur - 1] == '4') && (t > 1)) {
        cur--;
        t--;
        ans[cur] = '5';
      }
      if (cur - 1 == pos) {
        int cur2 = pos - 1;
        while (s[cur2] == '9') {
          ans[cur2] = '0';
          cur2--;
        }
        ans[cur2]++;
        if (ans[0] != '0') cout << ans[0];
        for (int i = 1; i < pos; i++) {
          cout << ans[i];
        }
      } else {
        cur--;
        ans[cur]++;
        if (ans[0] != '0') cout << ans[0];
        for (int i = 1; i <= cur; i++) {
          cout << ans[i];
        }
      }
    }
  } else {
    for (int i = 1; i < n; i++) cout << s[i];
  }
  return 0;
}
