#include <bits/stdc++.h>
using namespace std;
int A[200009], D[200009], imp;
bool add;
void solve(int &d) {
  if (D[1] >= 5) {
    d = 0;
    add = 1;
    return;
  }
  for (long long int i = (long long int)imp; i <= (long long int)imp; i++)
    if (D[i] >= 5) {
      D[i - 1]++;
      d = i - 1;
      int a = i - 1;
      while (D[a] == 10) {
        D[a] = 0;
        D[a - 1]++;
        a--;
      }
      if (D[a] >= 5)
        imp = a;
      else
        imp = 0;
      break;
    }
  for (long long int i = d; i >= 1; i--)
    if (D[i] != 0) {
      d = i;
      break;
    }
}
bool check(int d) {
  if (d == 0) return 0;
  if (imp == 0) return 0;
  return 1;
}
int main() {
  int n, t, aa = 0, d = 0, a;
  char ch;
  bool flag = 0;
  cin >> n >> t;
  for (long long int i = (long long int)1; i <= (long long int)n; i++) {
    if (flag) {
      cin >> ch;
      D[++d] = (int)ch - 48;
    } else {
      cin >> ch;
      A[++aa] = (int)ch - 48;
    }
    if (ch == '.') flag = 1;
  }
  aa--;
  for (long long int i = (long long int)1; i <= (long long int)d; i++)
    if (D[i] >= 5) {
      imp = i;
      break;
    }
  for (long long int i = (long long int)1; i <= (long long int)t; i++) {
    solve(d);
    if (!check(d)) break;
  }
  if (add) {
    A[aa]++;
    a = aa;
    while (A[a] == 10) {
      A[a] = 0;
      A[a - 1]++;
      a--;
    }
    if (A[0] != 0) cout << A[0];
    for (long long int i = (long long int)1; i <= (long long int)aa; i++)
      cout << A[i];
  } else {
    for (long long int i = (long long int)1; i <= (long long int)aa; i++)
      cout << A[i];
    cout << '.';
    for (long long int i = (long long int)1; i <= (long long int)d; i++)
      cout << D[i];
  }
}
