#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, t;
  cin >> n >> t;
  char c[n + 1];
  cin >> c;
  long long int f = -1;
  for (int i = 0; i < n; i++)
    if (c[i] == '.') {
      f = i;
      break;
    }
  if (f == -1) {
    cout << c;
    return 0;
  }
  long long int k = -1;
  for (int i = f + 1; i < n; i++)
    if (c[i] >= '5') {
      n = i;
      break;
    }
  while (t--) {
    long long int x = -1;
    for (int i = n; i > f; i--) {
      if (c[i] >= '5') {
        x = i;
        c[i] = '0';
        break;
      }
    }
    if (x == -1) break;
    int j;
    for (j = x - 1; j > f; j--) {
      if (c[j] != '9') {
        c[j] += 1;
        n = j + 1;
        break;
      }
      c[j] = '0';
    }
    if (j == f) {
      int i;
      n = f;
      c[f + 1] = '0';
      for (i = f - 1; i >= 0; i--) {
        if (c[i] != '9') {
          c[i] += 1;
          break;
        }
        c[i] = '0';
      }
      if (i < 0) {
        k = 1;
      }
      break;
    }
  }
  if (k != -1) cout << k;
  for (int i = 0; i < n; i++) cout << c[i];
}
