#include <bits/stdc++.h>
using namespace std;
int q[200010];
string s, z, x, x1;
int main() {
  int i, j, k, n, m, pos, now, t;
  scanf("%d%d", &n, &t);
  cin >> s;
  pos = s.find('.');
  z = s.substr(0, pos - 1);
  x = s[pos - 1] + s.substr(pos + 1);
  x1 = x;
  now = 0;
  for (i = x.size() - 1; i > 0; i--) {
    if (x[i] > '4') {
      if (x[i] > '5') {
        q[i] = 1;
        now = 1;
      } else {
        now++;
        q[i] = now;
      }
      x[i - 1]++;
    } else {
      now = 0;
      q[i] = t + 1;
    }
  }
  for (i = 1; i < x.size(); i++) {
    if (q[i] <= t) {
      x1[i - 1]++;
      x1 = x1.substr(0, i);
      break;
    }
  }
  j = i - 1;
  while (x1[j] - '0' > 9 && j > 0) {
    x1[j] -= 10;
    x1[j - 1]++;
    j--;
  }
  if (x1[0] - '0' > 9) {
    x1[0] -= 10;
    if (z.size() == 0) {
      z = "0";
    }
    z[z.size() - 1]++;
  }
  j = z.size() - 1;
  while (z[j] - '0' > 9 && j > 0) {
    z[j] -= 10;
    z[j - 1]++;
    j--;
  }
  if (z[0] - '0' > 9) {
    z[0] -= 10;
    z.insert(0, "1");
  }
  if (x1.size() == 1) {
    cout << z << x1[0];
  } else
    cout << z << x1[0] << '.' << x1.substr(1);
  return 0;
}
