#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0;
  bool f = false;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = true;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 3) + (x << 1) + (c ^ '0');
    c = getchar();
  }
  return f ? -x : x;
}
inline void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) write(x / 10);
  putchar(x % 10 + '0');
}
char s[200001];
long long n, t, x, now;
signed main() {
  ios::sync_with_stdio(false);
  cin >> n >> t >> s;
  now = n - 1;
  for (register long long i = 0; i < n; ++i)
    if (s[i] == '.') {
      x = i;
      break;
    }
  for (register long long i = x + 1; i < n; ++i)
    if (s[i] >= '5') {
      register long long p = i - 1;
      now = p;
      if (now == x) --now;
      ++s[now];
      --t;
      while (s[p] > '9' && p > x) s[p] -= 10, --p, ++s[p];
      break;
    }
  for (register long long i = now; i > x; --i)
    if (s[i] >= '5' && t) {
      register long long p = i - 1;
      now = p;
      if (now == x) --now;
      ++s[now];
      --t;
      while (s[p] > '9' && p > x) s[p] -= 10, --p, ++s[p];
    }
  if (now == x) --now;
  register long long p = now;
  while (s[p] > '9' && p) s[p] -= 10, --p, ++s[p];
  if (s[0] > '9') cout << 1, s[0] -= 10;
  for (register long long i = 0; i <= now; ++i) cout << s[i];
  return 0;
}
