#include <bits/stdc++.h>
using namespace std;
long long t;
string f_sum(string s) {
  long long l = s.length();
  long long c = 1;
  for (long long j = l - 1; j >= 0 && c; j--) {
    if (s[j] == '9') {
      s[j] = '0';
      continue;
    }
    c = 0;
    s[j] += 1;
    return s;
  }
  s = "1";
  while (l--) s += "0";
  return s;
}
string fun(string s, string sum, long long i, long long p) {
  long long l = sum.length();
  while (t && sum.length() > p + 1) {
    l = sum.length();
    if (sum[l - 1] < '5') return sum;
    t--;
    if (l - 2 == p) {
      sum = s.substr(0, p);
      return f_sum(sum);
    }
    sum[l - 2] += 1;
    sum.pop_back();
  }
  return sum;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n;
  cin >> n >> t;
  string s, sum = "";
  cin >> s;
  long long p = 0;
  while (s[p] != '.') {
    sum += s[p];
    p++;
  }
  sum += s[p];
  long long carry = 0;
  for (long long i = p + 1; i < s.length(); i++) {
    sum += s[i];
    if (s[i] < '5') {
      continue;
    }
    sum = fun(s, sum, i, p);
    break;
  }
  cout << sum;
  return 0;
}
