#include <bits/stdc++.h>
using namespace std;
int n, t;
string s;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> t >> s;
  int pos = s.find_first_of('.');
  if (pos == -1) {
    cout << s << endl;
    return 0;
  }
  int cpos = pos;
  for (int i = pos + 1; i < n; i++) {
    if (s[i] >= '5' && s[i] <= '9') {
      cpos = i;
      break;
    }
  }
  if (cpos == pos) {
    cout << s << endl;
    return 0;
  }
  cpos--;
  while (t > 0) {
    if (s[cpos] == '.') {
      cpos--;
      continue;
    } else if (s[cpos] < '9') {
      s[cpos]++;
      cpos--;
    } else if (s[cpos] == '9') {
      int mem = 1;
      while (cpos >= 0 && mem > 0) {
        if (s[cpos] == '9')
          s[cpos] = '0';
        else {
          s[cpos]++;
          mem = 0;
        }
        cpos--;
      }
    }
    if (s[cpos + 1] < '5' || s.substr(0, cpos + 2).find_first_of('.') == -1)
      break;
    t--;
  }
  if (s.substr(0, cpos + 2).find_first_of('.') == -1)
    s = s.substr(0, pos);
  else {
    s = s.substr(0, cpos + 2);
  }
  if (s[0] == '0') s = "1" + s;
  cout << s << endl;
  return 0;
}
