#include <bits/stdc++.h>
using namespace std;
long long G(long long a, long long b) {
  if (b == 0) return a;
  return G(b, a % b);
}
long long need[222222];
string f(string s) {
  int r = s.length();
  string q = "", ret = "";
  for (int i = 0; i < r; i++) q += '9';
  if (q == s) {
    ret += '1';
    for (int i = 0; i < r; i++) ret += '0';
    return ret;
  }
  int c = 1;
  for (int i = s.length() - 1; i >= 0; i--) {
    if (s[i] + c > '9')
      c = 1, ret += '0';
    else {
      ret += (char)(s[i] + c);
      c = 0;
    }
  }
  reverse(ret.begin(), ret.end());
  return ret;
}
int main() {
  ios_base::sync_with_stdio(false);
  long long n, t, inf = 1000 * 1000 * 1000 + 100, pos = -1;
  bool fl = 1;
  cin >> n >> t;
  string s, q = "";
  cin >> s;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '.') fl = 0, pos = i;
    if (fl) q += s[i];
  }
  for (int i = s.length() - 1; i > pos; i--) {
    if (s[i] < '4') need[i] = inf;
    if (s[i] > '4') need[i] = 0;
    if (s[i] == '4' && i < s.length() - 1)
      need[i] = need[i + 1] + 1;
    else if (s[i] == '4')
      need[i] = inf;
  }
  if (need[pos + 1] < t) {
    cout << f(q);
    return 0;
  }
  for (int i = pos + 1; i < s.length(); i++) {
    if (need[i] < t) {
      for (int j = 0; j < i - 1; j++) cout << s[j];
      cout << (char)(s[i - 1] + 1);
      return 0;
    }
  }
  cout << s;
}
