#include <bits/stdc++.h>
using namespace std;
template <typename T>
void read_to_vector(size_t N, std::vector<T> &v) {
  for (size_t i = 0; i < N; i++) {
    T tmp;
    std::cin >> tmp;
    v.push_back(tmp);
  }
}
template <typename T>
void print_vector(const std::vector<T> &v) {
  for (auto it = v.begin(); it < v.end(); it++) {
    if (it != v.begin()) std::cout << " ";
    std::cout << (*it);
  }
}
template <typename T>
void print_num(const std::vector<T> &v) {
  for (auto it = v.begin(); it < v.end(); it++) {
    std::cout << (*it);
  }
}
void roundup(vector<int> &dec, long long &t) {
  if (t <= 0) {
    return;
  }
  for (int i = 0; i < dec.size() - 1; i++) {
    if (dec[i + 1] >= 5) {
      dec[i]++;
      for (int j = i + 1; j < dec.size(); j++) {
        dec[j] = 0;
      }
      t--;
      for (int ii = i - 1; ii >= 0 && t > 0; ii--) {
        if (dec[ii + 1] >= 5) {
          dec[ii]++;
          dec[ii + 1] = 0;
          t--;
        }
      }
      return;
    }
  }
}
void add(vector<int> &v) {
  v[v.size() - 1]++;
  for (int i = v.size() - 2; i >= 0; i--) {
    if (v[i + 1] > 9) {
      v[i]++;
      v[i + 1] = 0;
    }
  }
  if (v[0] == 10) {
    v[0] = 0;
    v.insert(v.begin(), 1);
  }
}
void solve() {
  long long n, t;
  cin >> n >> t;
  string sg;
  cin >> sg;
  vector<int> vi;
  vector<int> vdec;
  bool ini = true;
  for (char c : sg) {
    if (c == '.') {
      ini = false;
    } else {
      if (ini) {
        vi.push_back(c - '0');
      } else {
        vdec.push_back(c - '0');
      }
    }
  }
  if (vdec[0] > 4 && t > 0) {
    add(vi);
    print_num(vi);
    cout << endl;
    return;
  }
  roundup(vdec, t);
  if (vdec[0] > 4 && t > 0) {
    add(vi);
    print_num(vi);
    cout << endl;
    return;
  }
  int traili;
  for (traili = vdec.size() - 1; traili >= 0; traili--) {
    if (vdec[traili] != 0) {
      break;
    }
  }
  if (traili == -1) {
    print_num(vi);
    cout << endl;
  } else {
    vdec.resize(traili + 1);
    print_num(vi);
    cout << '.';
    print_num(vdec);
    cout << endl;
  }
}
void pre_compute() {}
int main() {
  std::cout << std::setprecision(15);
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  pre_compute();
  solve();
  return 0;
}
