#include <bits/stdc++.h>
using namespace std;
char a[200005];
int main() {
  int n, t, z;
  cin >> n >> t;
  a[0] = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] == '.') z = i + 1;
  }
  int i;
  for (i = z; i <= n; i++) {
    if (a[i] >= '5' && i == z && t > 0) {
      for (int j = i - 2; j >= 1; j--)
        if (a[j] == '9')
          a[j] = '0';
        else {
          a[j]++;
          break;
        }
      if (a[1] == '0') cout << 1;
      for (int j = 1; j <= i - 2; j++) cout << a[j];
      cout << endl;
      return 0;
    }
    if (a[i] >= '5' && i - 1 >= z && t > 0) {
      a[i - 1] = (int(a[i - 1] - '0' + 1)) % 10 + '0';
      n = i - 1;
      i = i - 2;
      t--;
    }
  }
  for (int i = 1; i <= n; i++) cout << a[i];
  cout << endl;
}
