#include <bits/stdc++.h>
using namespace std;
int T, n;
int len;
string mark;
string oneStr = "";
int dotPos;
void CleanFrom(int pos) { mark = mark.substr(0, pos); }
void addOne() {
  bool needAdd = true;
  for (int i = mark.length() - 1; i >= 0; i--) {
    if (mark[i] < '9') {
      needAdd = false;
      mark[i] = mark[i] + 1;
      break;
    } else {
      mark[i] = '0';
    }
  }
  if (needAdd) oneStr = "1";
}
int main() {
  cin >> len >> n;
  getline(cin, mark);
  getline(cin, mark);
  dotPos = mark.find('.');
  bool finished = false;
  for (int i = dotPos + 1; i < len && !finished; i++) {
    if (mark[i] >= '5' && mark[i] <= '9') {
      for (int j = i - 1; j >= 0 && n >= 0; j--) {
        if (j == dotPos) {
          CleanFrom(j);
          addOne();
          finished = true;
          break;
        }
        mark[j] = mark[j] + 1;
        n--;
        if (mark[j] < '5' || mark[j] > '9' || n <= 0) {
          CleanFrom(j + 1);
          finished = true;
          break;
        }
      }
    }
  }
  cout << oneStr << mark;
  return 0;
}
