#include <bits/stdc++.h>
using namespace std;
const int oo = 1000000007;
string s;
int n, t, top, stk[200010];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> t;
  cin >> s;
  int key;
  for (int i = 0, _key = n - 2; i < _key; ++i) {
    stk[++top] = s[i] - '0';
    if (s[i + 1] == '.') {
      key = top;
      break;
    }
  }
  bool ok = false;
  for (int i = key + 1, _key = n - 1; i <= _key; ++i) {
    stk[++top] = s[i] - '0';
    while (top > key && t && stk[top] > 4) {
      ok = true;
      stk[top] = 10;
      t--;
      while (top && stk[top] == 10) {
        stk[top] = 0;
        top--;
        stk[top]++;
      }
    }
    if (ok) break;
  }
  if (stk[0]) cout << stk[0];
  for (int i = 1, _key = key; i <= _key; ++i) cout << stk[i];
  if (top > key) {
    cout << ".";
    for (int i = key + 1, _key = top; i <= _key; ++i) cout << stk[i];
  }
}
