#include <bits/stdc++.h>
using namespace std;
string s;
int N;
void print() {
  int i;
  for (i = N - 1; i >= 0; i--) {
    if (s[i] != '0') break;
  }
  if (s[i] == '.') i--;
  for (int j = 0; j <= i; j++) {
    cout << s[j];
  }
  cout << endl;
}
int main() {
  int t;
  cin >> N >> t;
  cin >> s;
  int flag = 0;
  int d = 0;
  for (int i = 0; i < N; i++) {
    if (s[i] == '.') {
      flag = 1;
      continue;
    }
    if (flag == 1 && s[i] >= '5') {
      d = i;
      break;
    }
  }
  if (d == 0 || t == 0) {
    print();
    return 0;
  }
  for (int i = d + 1; i < N; i++) {
    s[i] = '0';
  }
  flag = 0;
  while (t-- && s[d] >= '5') {
    s[d] = '0';
    d--;
    if (s[d] == '.') {
      d--;
      flag = 1;
    }
    if (d == -1) {
      cout << "1" << endl;
      break;
    }
    while (s[d] == '9') {
      s[d] = '0';
      d--;
      if (s[d] == '.') {
        d--;
        flag = 1;
      }
      if (d == -1) {
        cout << "1";
        break;
      }
    }
    s[d] = s[d] + 1;
    if (d == -1 || flag == 1) break;
  }
  print();
}
