#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, t, i;
  char str[200001];
  long long int dp[200001], min = -1, dot;
  cin >> n >> t;
  cin >> str;
  dp[n] = 10000000001;
  for (i = n - 1; i >= 0; i--) {
    if (str[i] == '.') {
      dot = i;
      break;
    } else if (str[i] >= '5') {
      dp[i] = 1;
    } else if (str[i] == '4') {
      dp[i] = dp[i + 1] + 1;
    } else {
      dp[i] = 10000000001;
    }
  }
  for (i = dot + 1; i < n; i++) {
    if (dp[i] <= t) {
      min = i;
      break;
    }
  }
  if (str[min - 1] == '.') {
    min--;
  }
  if (min >= 0) {
    long long int c = 1;
    for (i = min - 1; i >= 0; i--) {
      if (str[i] == '.')
        continue;
      else if (str[i] == '9' && c == 1) {
        str[i] = '0';
      } else {
        str[i]++;
        c = 0;
        break;
      }
    }
    if (c == 1) cout << "1";
    for (i = 0; i < min; i++) {
      cout << str[i];
    }
  } else
    cout << str;
  return 0;
}
