#include <bits/stdc++.h>
using namespace std;
int n, t;
string s;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> t;
  cin >> s;
  reverse(s.begin(), s.end());
  int st = -1;
  for (int i = 0; s[i] != '.'; i++) {
    if (s[i] >= '5') {
      st = i;
    }
  }
  if (st == -1) {
    reverse(s.begin(), s.end());
    cout << s << '\n';
    return 0;
  }
  int fours = 0;
  for (int i = st + 1; s[i] == '4'; i++) {
    fours++;
  }
  t = min(t, fours + 1);
  if (s[st + t] != '.')
    s[st + t]++;
  else {
    s[st + t + 1]++;
    for (int i = st + t + 1; i < (int)s.size() && s[i] > '9'; i++) {
      s[i] = '0';
      if (i + 1 < (int)s.size())
        s[i + 1]++;
      else
        s += '1';
    }
  }
  string ans = s.substr((s[st + t] != '.' ? st + t : st + t + 1));
  reverse(ans.begin(), ans.end());
  cout << ans << '\n';
  return 0;
}
