#include <bits/stdc++.h>
using namespace std;
int n, t;
string s;
void F(int i) {
  int z = 1;
  for (i = i; i < s.size(); i++) {
    if (s[i] == '9') {
      s[i] = '0';
    } else {
      s[i] = (char)(s[i] + 1);
      z = 0;
    }
    if (z == 0) {
      break;
    }
  }
  if (z) {
    s = s + '1';
  }
}
int main() {
  cin >> n >> t;
  cin >> s;
  reverse(s.begin(), s.end());
  int index = s.size() - 1;
  for (index = index; index >= 0; index--) {
    if (s[index] == '.') {
      index--;
      break;
    }
  }
  int sw = 0;
  for (; index >= 0; index--) {
    if (s[index] >= '5') {
      sw = 1;
      break;
    }
  }
  if (sw == 0) {
    reverse(s.begin(), s.end());
    cout << s << endl;
    return 0;
  }
  while (t) {
    if (s[index + 1] == '.') {
      if (s[index] >= '5') {
        F(index + 2);
        s[index + 1] = '#';
        t--;
        break;
      } else {
        t = 0;
      }
    } else {
      if (s[index] >= '5') {
        F(index + 1);
        t--;
        s[index] = '#';
        index++;
        for (; index < s.size(); index++) {
          if (s[index] >= '5') {
            break;
          }
          if (s[index] == '.') {
            t = 0;
            break;
          }
        }
      } else {
        t = 0;
      }
    }
  }
  reverse(s.begin(), s.end());
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '#') {
      break;
    }
    cout << s[i];
  }
}
