#include <bits/stdc++.h>
using namespace std;
const int N = 200010;
const int INF = 0x3f3f3f3f;
const int iinf = 1 << 30;
const long long linf = 2e18;
const int MOD = 1000000007;
const double eps = 1e-7;
void douout(double x) { printf("%lf\n", x + 0.0000000001); }
template <class T>
void print(T a) {
  cout << a << endl;
  exit(0);
}
template <class T>
void chmin(T &a, T b) {
  if (a > b) a = b;
}
template <class T>
void chmax(T &a, T b) {
  if (a < b) a = b;
}
template <class T>
void upd(T &a, T b) {
  (a += b) %= MOD;
}
template <class T>
void mul(T &a, T b) {
  a = (long long)a * b % MOD;
}
char s[N];
int d[N];
int n, t, point, l, high;
void dp() {
  d[n + 1] = INF;
  for (int i = (n); i >= (point + 1); i--) {
    if (s[i] < '4') d[i] = INF;
    if (s[i] >= '5') d[i] = 1;
    if (s[i] == '4') d[i] = d[i + 1] + 1;
  }
}
void carry(int p) {
  int flg = 1;
  for (int i = (p - 1); i >= (1); i--) {
    if (flg == 0) break;
    if (s[i] == '.') continue;
    if (s[i] == '9') {
      s[i] = '0';
      if (i > point)
        l = i - 1;
      else
        l = point - 1;
    } else {
      s[i]++;
      flg = 0;
      break;
    }
  }
  if (flg) high = 1;
}
signed main() {
  scanf("%d%d%s", &n, &t, s + 1);
  l = n;
  for (int i = (1); i <= (n); i++)
    if (s[i] == '.') {
      point = i;
      break;
    }
  dp();
  for (int i = (point + 1); i <= (n); i++)
    if (d[i] <= t) {
      carry(i);
      l = i - 1;
      break;
    }
  if (high) {
    putchar('1');
    for (int i = (1); i <= (point - 1); i++) putchar('0');
  } else {
    for (int i = (1); i <= (l - 1); i++) putchar(s[i]);
    if (s[l] != '.') putchar(s[l]);
  }
  return 0;
}
