#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t, i;
  string a;
  cin >> n >> t >> a;
  for (i = 0; i < n; i++) {
    if (a[i] == '.') break;
  }
  string x;
  string y;
  x = a.substr(0, i);
  int length = i;
  y = a.substr(i + 1, a.size() - i - 1);
  int count = 0;
  int finalLength = y.size();
  for (i = 1; i < finalLength; i++) {
    if (count >= t) {
      break;
    }
    if (y[0] > '4') {
      int z = length - 1;
      int flag = 0;
      while (z >= 0) {
        if (x[z] - 48 < 9) {
          x[z]++;
          flag = 1;
          break;
        } else {
          x[z] = '0';
          z--;
        }
      }
      if (flag == 0) {
        x = "1" + x;
      }
      cout << x << "\n";
      return 0;
    } else {
      if (y[i] > '4') {
        y[i - 1] += 1;
        finalLength = i;
        count++;
        if (y[i - 1] >= 5) i -= 2;
      }
    }
  }
  if (y[0] > '4' && count < t) {
    int z = length - 1;
    int flag = 0;
    while (z >= 0) {
      if (x[z] - 48 < 9) {
        x[z]++;
        flag = 1;
        break;
      } else {
        x[z] = '0';
        z--;
      }
    }
    if (flag == 0) {
      x = "1" + x;
    }
    cout << x << "\n";
    return 0;
  }
  cout << x << ".";
  for (i = 0; i < finalLength; i++) cout << y[i];
  cout << endl;
  return 0;
}
