#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t;
  cin >> n;
  cin >> t;
  string dec;
  cin >> dec;
  int point = -1;
  for (int i = 0; i < dec.length(); i++) {
    if (dec[i] == '.') point = i;
  }
  if (point == -1)
    cout << dec << endl;
  else {
    int i = point + 1;
    while (i < dec.length()) {
      if (dec[i] < '5')
        i++;
      else
        break;
    }
    for (int j = 0; j < t && i > point; j++) {
      if (dec[i] < '5') break;
      if (dec[i] >= '5') {
        i--;
        while (i >= 0) {
          if (i == point) i--;
          if (dec[i] < '9') {
            dec[i]++;
            break;
          } else {
            dec[i--] = '0';
          }
        }
      }
    }
    if (i < 0)
      cout << "1" << dec.substr(0, point) << endl;
    else if (i < point)
      cout << dec.substr(0, point) << endl;
    else
      cout << dec.substr(0, i + 1) << endl;
  }
  return 0;
}
