#include <bits/stdc++.h>
using namespace std;
const int MAX = 1100100;
string s;
int N, C, last = -1;
void process(int pos, int times) {
  if (!times) return;
  assert(s[pos] >= '5');
  N = pos;
  bool ok = false;
  for (int I = pos - 1; I >= 0; I--) {
    if (s[I] == '.') {
      ok = true;
      N = I;
      continue;
    }
    if (s[I] < '9') {
      s[I]++;
      if (s[I] == '5' && !ok) {
        process(I, times - 1);
      }
      break;
    }
    s[I] = '0';
    if (!ok)
      N = I;
    else if (I == 0) {
      N++;
      s = "1" + s;
    }
  }
}
int main() {
  cin >> N >> C;
  cin >> s;
  for (int I = 0; I < int((s).size()); I++) {
    if (s[I] == '.') {
      for (int K = I + 1; K < int((s).size()); K++) {
        if (s[K] >= '5') {
          last = K;
          break;
        }
      }
      if (last > 0) process(last, C);
      s = s.substr(0, N);
      cout << s << endl;
      return 0;
    }
  }
}
