#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int getrnd(int l, int r) { return uniform_int_distribution<int>(l, r)(rng); }
template <typename T1, typename T2>
bool relax(T1& a, const T2& b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename T1, typename T2>
bool strain(T1& a, const T2& b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
void solve() {
  int n;
  cin >> n;
  vector<ll> z(n), wasc(n, 0);
  vector<ld> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    z[i] = a[i];
    if (a[i] - z[i] < -1e-6)
      wasc[i] = -1;
    else if (a[i] - z[i] > 1e-6)
      wasc[i] = 1;
  }
  ll s = 0;
  for (int i = 0; i < n; ++i) s += z[i];
  for (int i = 0; i < n; ++i) {
    if (s == 0) break;
    if (wasc[i] > 0 && z[i] >= 0 && s < 0) {
      ++z[i];
      ++s;
    } else if (wasc[i] < 0 && z[i] <= 0 && s > 0) {
      --z[i];
      --s;
    }
  }
  for (int i = 0; i < n; ++i) cout << z[i] << '\n';
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(nullptr);
  cout.tie(nullptr);
  srand(time(0));
  int t = 1;
  while (t--) solve();
  return 0;
}
