#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t, a = 0, x, b = 1, b1 = 1, y, m = 0;
  string s;
  cin >> n >> t >> s;
  x = s.size() - 1;
  for (int i = s.size() - 1; i > 0; i--) {
    if (s[i] == '.') y = i;
    if (s[i] == '.' && (s[i + 1] == '5' || s[i + 1] == '6' || s[i + 1] == '7' ||
                        s[i + 1] == '8' || s[i + 1] == '9')) {
      i--;
      x = i;
      while (s[i] == '9' && i > 0) {
        s[i] = '0';
        i--;
      }
      if (s[i] == '9') {
        s[i] = '0';
        b1 = 0;
      } else if (s[i] != '9') {
        s[i] += 1;
      }
      b = 0;
      break;
    }
  }
  if (b) {
    for (int i = y; i < s.size(); i++) {
      if (s[i] == '5' || s[i] == '6' || s[i] == '7' || s[i] == '8' ||
          s[i] == '9') {
        m = i;
        break;
      }
    }
    for (int i = m; i > 0 && a < t; a++, i--) {
      if (s[i] == '5' || s[i] == '6' || s[i] == '7' || s[i] == '8' ||
          s[i] == '9') {
        while (s[--i] == '9' && i > 0)
          ;
        if (s[i] == '.') {
          i--;
          b = 0;
        }
        if (b) {
          s[i] += 1;
          x = i;
        }
        if (!b) {
          x = i;
          while (s[i] == '9' && i > 0) {
            s[i] = '0';
            i--;
          };
          if (s[i] == '9') {
            s[i] = '0';
            b1 = 0;
          } else if (s[i] != '9')
            s[i] += 1;
          break;
        }
        i++;
      } else
        break;
    }
  }
  if (!b1) cout << 1;
  for (int i = 0; i <= x; i++) {
    cout << s[i];
  }
  cout << endl;
  return 0;
}
