#include <bits/stdc++.h>
using namespace std;
template <class C>
void mini(C& _a4, C _b4) {
  _a4 = min(_a4, _b4);
}
template <class C>
void maxi(C& _a4, C _b4) {
  _a4 = max(_a4, _b4);
}
template <class TH>
void _dbg(const char* sdbg, TH h) {
  cerr << sdbg << '=' << h << endl;
}
template <class TH, class... TA>
void _dbg(const char* sdbg, TH h, TA... a) {
  while (*sdbg != ',') cerr << *sdbg++;
  cerr << '=' << h << ',';
  _dbg(sdbg + 1, a...);
}
template <class T>
ostream& operator<<(ostream& os, vector<T> V) {
  os << "[";
  for (auto& vv : V) os << vv << ",";
  os << "]";
  return os;
}
const long long MAX = 200101;
string z;
long long n, t;
long long dp[MAX];
long long inf = 2e9;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(11);
  if (0) cout << fixed << setprecision(6);
  cin >> n >> t;
  cin >> z;
  if (z[0] == '.') {
    z = '0' + z;
    n++;
  }
  dp[n - 1] = inf;
  long long res = -1;
  for (long long i = n - 2; z[i + 1] != '.'; i--) {
    if (z[i + 1] == '4')
      dp[i] = dp[i + 1] + 1;
    else {
      if (z[i + 1] > '4')
        dp[i] = 1;
      else
        dp[i] = inf;
    }
    if (dp[i] <= t) res = i;
  }
  if (res == -1) {
    cout << z << endl;
  } else {
    if (z[res] == '.') res--;
    long long pom = res;
    while (res >= 0 && z[res] == '9') {
      z[res] = '0';
      res--;
    }
    if (res == -1) {
      cout << 1;
    } else
      z[res]++;
    cout << z.substr(0, pom + 1) << endl;
  }
}
