#include <bits/stdc++.h>
using namespace std;
bool arr[2000001];
vector<int> v;
void sieve() {
  arr[1] = arr[0] = true;
  for (long long i = 2; i < 2000001; i++) {
    if (arr[i] == false) {
      v.push_back(i);
      for (long long j = i * i; j < 2000001; j += i) arr[j] = true;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int x, t, i;
  int a = -1;
  bool dot = false, found = false;
  string s;
  cin >> x >> t;
  cin >> s;
  int arr[x];
  for ((i) = 0; (i) < (int)(x); (i)++) {
    if (s[i] == '.')
      arr[i] = -1;
    else
      arr[i] = s[i] - '0';
    if (arr[i] == -1) dot = true;
    if (dot && arr[i] >= 5 && !found) {
      a = i;
      found = true;
      break;
    }
  }
  if (!found) {
    for (int i = 0; i < x; i++) {
      if (arr[i] == -1)
        cout << ".";
      else
        cout << arr[i];
    }
    return 0;
  }
  int k = a;
  for (int i = a; i > 0; i--) {
    if (arr[i] < 5 || t == 0)
      break;
    else if (arr[i - 1] == -1) {
      arr[i - 2]++;
      for (int j = i - 3; j >= 0; j--) {
        if (arr[j + 1] == 10) {
          arr[j + 1] = 0;
          arr[j]++;
        } else
          break;
      }
      for (int j = 0; j < i - 1; j++) cout << arr[j];
      return 0;
    } else {
      arr[i - 1]++;
      k = i - 1;
      t--;
    }
  }
  for (int j = 0; j <= k; j++) {
    if (arr[j] == -1)
      cout << ".";
    else
      cout << arr[j];
  }
}
