#include <bits/stdc++.h>
using namespace std;
vector<string> split(const string &s, char c) {
  vector<string> v;
  stringstream ss(s);
  string x;
  while (getline(ss, x, c)) v.push_back(x);
  return v;
}
void err(vector<string>::iterator it) {}
template <typename T, typename... Args>
void err(vector<string>::iterator it, T a, Args... args) {
  cerr << "[DEBUG] " << it->substr((*it)[0] == ' ', it->length()) << " = " << a
       << '\n';
  err(++it, args...);
}
const int MOD = 1000000007;
template <class T, class U>
inline T tmin(T a, U b) {
  return (a < b) ? a : b;
}
template <class T, class U>
inline T tmax(T a, U b) {
  return (a > b) ? a : b;
}
template <class T, class U>
inline void amax(T &a, U b) {
  if (b > a) a = b;
}
template <class T, class U>
inline void amin(T &a, U b) {
  if (b < a) a = b;
}
template <class T>
inline T tabs(T a) {
  return (a > 0) ? a : -a;
}
template <class T>
T gcd(T a, T b) {
  while (b != 0) {
    T c = a;
    a = b;
    b = c % b;
  }
  return a;
}
int main(int argc, char *argv[]) {
  ios_base::sync_with_stdio(false);
  string s;
  int n, t;
  cin >> n >> t >> s;
  int pos = -1;
  for (int i = (0); i < (n); ++i)
    if (s[i] == '.') {
      pos = i;
      break;
    }
  int en = n;
  bool met = false;
  for (int i = (pos + 1); i < (n); ++i) {
    if (s[i] >= '5') {
      en = i;
      while (t > 0 && s[en] >= '5' && en > pos) {
        if (en - 1 != pos)
          s[en - 1]++;
        else {
          int cur = pos - 1;
          while (s[cur] == '9') {
            s[cur] = '0';
            if (cur)
              cur--;
            else {
              s = "0" + s;
              met = true;
              break;
            }
          }
          s[cur]++;
        }
        en--, t--;
      }
      break;
    }
  }
  if (en == pos) en--;
  if (met) en++;
  string ans = s.substr(0, en + 1);
  printf("%s\n", ans.c_str());
  return 0;
}
