#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int N = 510;
long long int powxy(long long int x, long long int y) {
  if (y == 0) return 1;
  if (y % 2 == 1) return (x * powxy(x, y - 1)) % mod;
  long long int t = powxy(x, y / 2) % mod;
  return (t * t) % mod;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  long long int dp[n + 1];
  dp[n] = INT_MAX;
  int flag = n;
  for (int i = 0; i <= n - 1; i++)
    if (s[i] == '.') flag = i;
  for (int i = n - 1; i >= 0; i--) {
    dp[i] = INT_MAX;
    if (s[i] - '0' == 4 && flag < i) dp[i] = 1 + dp[i + 1];
    if (s[i] - '0' >= 5 && flag < i) dp[i] = 1;
  }
  int i;
  for (i = 0; i <= n - 1; i++) {
    if (dp[i] <= k) break;
  }
  if (i == n) {
    cout << s;
    return 0;
  }
  s = s.substr(0, i);
  int c = 1;
  for (int j = i - 1; j >= 0; j--) {
    if (s[j] == '.') continue;
    s[j] = char(s[j] + c);
    c = (s[j] - '0') / 10;
    s[j] = (s[j] - '0') % 10 + '0';
  }
  if (c) {
    s = '1' + s;
    s = s.substr(0, i);
  }
  if (s[i - 1] == '.') s = s.substr(0, i - 1);
  cout << s;
}
