#include <bits/stdc++.h>
using namespace std;
const double PI = acos(0) * 2;
const double EPS = 1e-8;
const long long MOD = 1e9 + 7;
const int MAXN = 1e5 + 5;
const int oo = 1e9;
const double foo = 1e30;
template <class T>
int getbit(T s, int i) {
  return (s >> i) & 1;
}
template <class T>
T onbit(T s, int i) {
  return s | (T(1) << i);
}
template <class T>
T offbit(T s, int i) {
  return s & (~(T(1) << i));
}
template <class T>
int cntbit(T s) {
  return __builtin_popcounll(s);
}
inline void addmod(int& a, int val, int p = MOD) {
  if ((a = (a + val)) >= p) a -= p;
}
inline void submod(int& a, int val, int p = MOD) {
  if ((a = (a - val)) < 0) a += p;
}
inline int mult(int a, int b, int p = MOD) { return (long long)a * b % p; }
int n, t;
string s;
int main() {
  cin >> n >> t;
  cin >> s;
  int cnt = 0;
  int ok = 0;
  int pos = -1, find = -1;
  for (int i = 0; i < n; i++) {
    if (s[i] == '.') {
      ok = 1;
      pos = i;
      continue;
    }
    if (ok) {
      if (s[i] >= '5') {
        find = i;
        break;
      }
    }
  }
  int now = find;
  if (find == -1) {
    cout << s;
    return 0;
  }
  find = n;
  while (cnt < t && now > pos) {
    int pre = now - 1;
    if (s[pre] == '.') pre--;
    if (s[now] >= '5') {
      find = now;
      int htr = pre;
      while (s[htr] == '9' && htr >= 0) {
        s[htr] = '0';
        htr--;
      }
      if (~htr && s[htr] == '.') htr--;
      while (s[htr] == '9' && htr >= 0) {
        s[htr] = '0';
        htr--;
      }
      if (htr == -1) {
        s = '1' + s;
        break;
      } else {
        s[htr] = s[htr] + 1;
        now = htr + 1;
      }
    }
    cnt++;
    now--;
  }
  if (find > 0 && s[find - 1] == '.') find -= 2;
  if (find < pos) find = pos;
  for (int i = 0; i < find; i++) cout << s[i];
}
