#include <bits/stdc++.h>
using namespace std;
string s;
int n, t;
const int Mx = 1e9 + 7;
int dp[200005];
int main() {
  int i, j;
  cin >> n >> t >> s;
  memset(dp, 63, sizeof(dp));
  dp[s.size()] = 0;
  for (i = s.size() - 1; s[i] != '.'; --i) {
    if (s[i] == '.') break;
    if (s[i] == '4') {
      if (i != s.size() - 1) dp[i] = dp[i + 1] + 1;
    } else if (s[i] > '4')
      dp[i] = 1;
  }
  for (; i < s.size(); ++i)
    if (s[i] != '.')
      if (dp[i] <= t) break;
  if (dp[i]) ++s[i - 1];
  s = s.substr(0, i);
  --i;
  while (s[i] != '.') {
    if (s[i] == '9' + 1) {
      s[i] = '0';
      s[i - 1]++;
      --i;
    } else
      break;
  }
  if (s[i] == '.' + 1) {
    s[i] = '.';
    ++s[i - 1];
    --i;
    while (i) {
      if (s[i] == '9' + 1) {
        s[i] = '0';
        ++s[i - 1];
        --i;
      } else
        break;
    }
    if (s[0] == '9' + 1) {
      s[0] = '0';
      s = '1' + s;
    }
  }
  while (s[s.size() - 1] == 0) s = s.substr(0, s.size() - 1);
  if (s[s.size() - 1] == '.') s = s.substr(0, s.size() - 1);
  cout << s << endl;
  return 0;
}
