#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t;
  scanf("%d%d", &n, &t);
  string s;
  cin >> s;
  int i = 0;
  while (s[i] != '.') i++;
  while (s[i] < '5' && i < n) {
    i++;
  }
  if (i == n) {
    cout << s << endl;
    return 0;
  }
  i--;
  int len = 0;
  while (t > 0) {
    if (s[i] != '.')
      s[i]++;
    else {
      i--;
      len = i;
      while (i >= 0 && s[i] == '9') s[i--] = '0';
      if (i == -1)
        cout << 1;
      else
        s[i]++;
      break;
    }
    if (s[i] < '5') {
      len = i;
      break;
    } else {
      len = i;
      i--;
    }
    t--;
  }
  for (int k = 0; k <= len; k++) {
    cout << s[k];
  }
  return 0;
}
