#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long n, ans = 0;
  cin >> n;
  vector<double> a(n);
  for (long long i = 0; i < n; ++i) cin >> a[i];
  for (auto i : a) ans += (long long)(i);
  for (long long i = 0; i < n; ++i) {
    if (ans > 0 && a[i] < 0 && a[i] != (long long)a[i]) {
      cout << (long long)(a[i] - 1) << endl;
      ans--;
    } else if (ans < 0 && a[i] > 0 && a[i] != (long long)a[i]) {
      cout << (long long)(a[i] + 1) << endl;
      ans++;
    } else
      cout << (long long)a[i] << endl;
  }
  return 0;
}
