#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t;
  string s;
  cin >> n >> t >> s;
  int i = s.find('.') + 1, k = i - 2;
  while (s[i] < '5') {
    i++;
    if (i == n) {
      i--;
      while (s[i] == '0') {
        i--;
        if (s[i] == '.') {
          i--;
          break;
        }
      }
      for (int j = 0; j <= i; j++) {
        cout << s[j];
      }
      return 0;
    }
  }
  while (t > 0 && s[i] + 1 > '4') {
    i--;
    t--;
    if (s[i] == '.') {
      i--;
      break;
    }
  }
  bool ok = 1;
  while (s[i] + 1 > '9') {
    s[i] = '0';
    i--;
    if (i == -1) {
      ok = 0;
      break;
    }
  }
  if (ok) {
    s[i]++;
  } else {
    cout << '1';
  }
  if (i > k) {
    k = i;
  }
  for (int j = 0; j <= k; j++) {
    cout << s[j];
  }
  return 0;
}
