#include <bits/stdc++.h>
using namespace std;
int n, t, decimal;
char ch;
char a[200010 + 20];
int main() {
  cin >> n >> t;
  cin.get();
  for (int i = 1; i <= n; i++) {
    cin >> ch;
    if (ch == '.')
      decimal = true, a[i] = '.';
    else if (!decimal)
      a[i] = ch;
    else if (ch >= '5' && t)
      if (a[i - 1] == '.') {
        a[i - 2]++, n = i - 2, decimal = false;
        int k = 0;
        while (a[n - k] > '9') a[n - k] = '0', a[n - k - 1]++, k++;
      } else
        a[i - 1]++, n = i - 1;
    else
      a[i] = ch;
  }
  while (decimal && --t && a[n] >= '5') {
    if (a[n - 1] == '.') {
      a[n - 2]++, n -= 2;
      int k = 0;
      while (a[n - k] > '9') a[n - k] = '0', a[n - k - 1]++, k++;
      break;
    } else
      a[n - 1]++, n -= 1;
  }
  if (a[0] != 0) cout << 1;
  for (int i = 1; i <= n; i++) cout << a[i];
  cout << '\n';
  return 0;
}
