#include <bits/stdc++.h>
using namespace std;
const long long M = 1e9 + 7;
void inp(long long a[], long long n) {
  for (long long i = 0; i < n; i++) cin >> a[i];
}
void solve() {
  long long n, x = 0, y = 0, p = 0, q = 0, b, c, d, e;
  cin >> n;
  long double a[n];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] >= 0) {
      x += (long long)floor(a[i]);
      if (round(a[i]) != a[i]) p++;
    } else {
      y += (long long)floor(abs(a[i]));
      if (round(a[i]) != a[i]) q++;
    }
  }
  if (x == y) {
    b = p, c = 0;
    d = 0, e = q;
  } else if (x < y) {
    c = y - x, b = p + x - y;
    d = 0, e = q;
  } else {
    b = p, c = 0;
    d = x - y, e = q - x + y;
  }
  for (long long i = 0; i < n; i++) {
    if (round(a[i]) == a[i]) {
      cout << (long long)round(a[i]) << '\n';
      continue;
    }
    if (a[i] > 0) {
      if (b > 0) {
        cout << (long long)floor(a[i]) << '\n';
        b--;
      } else
        cout << (long long)ceil(a[i]) << '\n';
    } else {
      if (d > 0) {
        cout << (long long)floor(a[i]) << '\n';
        d--;
      } else
        cout << (long long)ceil(a[i]) << '\n';
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) solve();
}
