#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
using namespace std;
template <class T>
bool ckmin(T& a, const T& b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
bool ckmax(T& a, const T& b) {
  return a < b ? a = b, 1 : 0;
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const long double pii = 3.14159265359;
const int MOD = 1000000007;
const char nl = '\n';
const int MX = 200001;
void solve() {
  int N, T;
  cin >> N >> T;
  string str;
  cin >> str;
  int pt = -1, st = N - 1;
  for (int x = 0; x < (N); x++) {
    if (str[x] == '.') {
      pt = x;
      break;
    }
  }
  for (int x = pt + 1; x < (N); x++) {
    if (str[x] >= '5') {
      st = x;
      break;
    }
  }
  for (int x = st + 1; x < (N); x++) str[x] = '0';
  for (int x = (st + 1) - 1; x >= pt + 1; x--) {
    if (str[x] > '9') {
      if (x == pt + 1) {
        str[x - 2]++;
      } else
        str[x - 1]++;
      str[x] = '0';
    }
    if (str[x] >= '5' && T) {
      T--;
      if (x == pt + 1) {
        str[x - 2]++;
      } else
        str[x - 1]++;
      str[x] = '0';
    }
  }
  for (int x = (st)-1; x >= 0; x--) {
    if (str[x] > '9' && x != 0) {
      str[x - 1]++;
      str[x] = '0';
    }
  }
  if (str[0] > '9') {
    str[0] = '0';
    reverse(str.begin(), str.end());
    str += '1';
    reverse(str.begin(), str.end());
  }
  int newLen = N;
  for (int x = (N)-1; x >= 0; x--) {
    if (str[x] != '0') {
      newLen = x + 1;
      break;
    }
  }
  if (str[newLen - 1] == '.') {
    newLen--;
  }
  str.resize(newLen);
  cout << str << nl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int Test_case = 1;
  while (Test_case-- != 0) {
    solve();
  }
  return 0;
}
