#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
long double PI = 4 * atan(1);
int n, t, flag, x, pnt, fin = MOD;
string second;
void fer(int i) {
  int j = i - 1;
  while (j >= 0 && second[j] == '9') second[j] = '0', j--;
  if (j < 0) {
    second = "1" + second;
  } else {
    second[j]++;
  }
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  cin >> n >> t >> second;
  for (int i = 0; i < second.length(); i++) {
    if (second[i] == '.') flag = 1;
    if (flag) {
      if (second[i] >= '5') {
        x = i;
        break;
      }
    }
  }
  if (!x) {
    cout << second;
    return 0;
  }
  flag = 0;
  while (t-- && x >= 0) {
    if (second[x] == '.') flag = 1;
    if (flag) break;
    if (second[x] >= '5') {
      if (second[x - 1] == '.') {
        pnt = 1;
        fer(x - 1);
        break;
      }
      second[--x]++;
      fin = min(fin, x);
    }
  }
  if (pnt) {
    for (int i = 0; i < second.length(); i++) {
      if (second[i] == '.') break;
      cout << second[i];
    }
  } else {
    for (int i = 0; i < fin + 1; i++) cout << second[i];
  }
  return 0;
}
