#include <bits/stdc++.h>
const int N = 1e5 + 10;
const int MOD = 1e9 + 9;
using namespace std;
int main() {
  int n, t;
  cin >> n >> t;
  string s;
  cin >> s;
  n--;
  int it = n;
  for (int i = n; i >= 0; i--) {
    if (s[i] == '.' || s[i] == '.' + 1) break;
    if (s[i] >= '5') it = i;
  }
  int cnt = 0, jt = n;
  for (int i = it; i >= 0; i--) {
    if (s[i] == '.' || s[i] == '.' + 1) break;
    if (s[i] == '9' + 1) {
      s[i - 1]++;
      jt = i - 1;
    } else if (s[i] >= '5') {
      s[i - 1]++;
      cnt++;
      jt = i - 1;
      if (cnt == t) break;
    }
  }
  int w = s.find_first_of('.');
  if (w == string::npos) {
    w = s.find_first_of('.' + 1);
    s = s.substr(0, w);
    while (1) {
      if (w == 0) {
        if (s[0] == '0') s = '1' + s;
        break;
      }
      s[w - 1]++;
      if (s[w - 1] == '9' + 1) {
        s[w - 1] = '0';
        w--;
      } else
        break;
    }
  } else
    s = s.substr(0, jt + 1);
  cout << s;
  return 0;
}
