#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  string s;
  int t, n;
  cin >> n >> t >> s;
  int in = -1;
  int x = s.find('.');
  string num;
  int temp = 1;
  bool c = 0;
  for (int i = x - 1; i > -1; i--) {
    if (temp == 1) {
      if (s[i] - '0' == 9) {
        num += '0';
        if (i == 0) num += '1';
        temp = 1;
      } else {
        num += (s[i] - '0' + temp) + '0';
        temp = 0;
      }
    } else {
      temp = 0;
      num += s[i];
    }
  }
  for (int i = x + 1; i < s.size(); i++) {
    if (s[i] - '0' >= 5) {
      in = i;
      break;
    }
  }
  for (int i = in; i > 0; i--) {
    if (s[i] - '0' >= 5) {
      if (s[i - 1] == '.') {
        in = i;
        s.erase(0, i - 1);
        reverse(s.begin(), s.end());
        s += num;
        reverse(s.begin(), s.end());
        s.erase(s.find('.'));
        in = -1;
        break;
      } else {
        s[i - 1] = ((s[i - 1] - '0') + 1) + '0';
      }
      in = i;
      t--;
    } else {
      break;
    }
    if (t == 0) {
      break;
    }
  }
  if (in != -1) {
    s.erase(in);
  }
  cout << s;
  return 0;
}
