#include <bits/stdc++.h>
using namespace std;
void addOne(string &s, long long loc) {
  if (loc < 0) {
    string temp = "1";
    temp += s;
    s = temp;
    return;
  }
  if (s.at(loc) == '9') {
    s.at(loc) = '0';
    addOne(s, loc - 1);
    return;
  }
  s.at(loc) = ((s.at(loc) - '0') + 1) + '0';
}
int main() {
  long long n, t;
  cin >> n >> t;
  string s;
  cin >> s;
  string k;
  string back;
  bool addNum = false;
  int i;
  for (i = 0; i < s.size(); i++) {
    if (s.at(i) == '.') {
      i++;
      break;
    }
    k += s.at(i);
  }
  long long loc = -1;
  long long newCount = 0;
  for (; i < s.size(); i++) {
    if (s.at(i) - '0' > 4 && loc == -1) {
      loc = newCount;
    }
    newCount++;
    back += s.at(i);
  }
  if (t > 0 && loc != -1) {
    for (int j = loc + 1; j < back.size(); j++) {
      back.at(j) = '0';
    }
  }
  int j;
  for (j = loc; j >= 0 && t > 0; j--, t--) {
    if (back.at(j) - '0' > 4 && j == 0) {
      addNum = true;
      break;
    }
    if (back.at(j) - '0' > 4) {
      back.at(j) = '0';
      back.at(j - 1) = (char)(((back.at(j - 1) - '0') + 1) + '0');
    }
  }
  while (back.size() > 0 && back.at(back.size() - 1) == '0') {
    back.pop_back();
  }
  if (addNum) {
    addOne(k, k.size() - 1);
    cout << k << endl;
  } else if (back == "") {
    cout << k << endl;
  } else {
    cout << k << "." << back << endl;
  }
  return 0;
}
