#include <bits/stdc++.h>
using namespace std;
long long fp(long long x, long long exp) {
  if (exp == 0) return 1;
  if (exp % 2 == 0) return fp((x * x), exp / 2);
  return (((fp((x * x), exp / 2))) * x);
}
int main() {
  bool c;
  int ind, t, pot = -1;
  string s;
  cin >> t >> t >> s;
  ind = s.size() - 1;
  for (int i = 0; i < s.size() && pot == -1; i++)
    if (s[i] == '.') pot = i;
  for (int i = pot + 1; i < s.size(); i++)
    if (s[i] > '4') {
      ind = i;
      break;
    }
  for (int i = ind; i > pot + 1 && t; i--) {
    c = false;
    if (s[i] > '4') s[i - 1]++, s[i] = '0' - 1, t--;
    for (i; i > pot + 1 && s[i] > '9'; i--) s[i - 1]++, c = true, s[i] = '*';
    if (c) i++;
  }
  if (s[pot + 1] > '4' && t) s[pot - 1]++, t--, s[pot] = '0' - 1;
  for (int i = pot - 1; i > 0 && s[i] > '9'; i--) s[i - 1]++, s[i] = '0';
  if (s[0] > '9') s[0] = '0', s = '1' + s;
  pot = s.size();
  for (int i = 0; i < s.size(); i++)
    if (s[i] == '0' - 1) {
      pot = i;
      break;
    }
  for (int i = 0; i < pot; i++) cout << s[i];
  return 0;
}
