#include <bits/stdc++.h>
using namespace std;
int main() {
  long long S, Z, s1, s2, s3, s4, s5, s6, x, y, z, n, m, i, j, l, k, t;
  float a[200001];
  long long b[200001];
  long long c[200001];
  long long d[200001];
  long long e[200001];
  long long f[200001];
  string s;
  string q;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    x = a[i];
    b[i] = x;
  }
  S = 0;
  for (i = 1; i <= n; i++) {
    S = S + b[i];
  }
  if (S == 0) {
    for (i = 1; i <= n; i++) {
      cout << b[i] << endl;
    }
  }
  if (S < 0) {
    x = 0 - S;
    for (i = 1; i <= n; i++) {
      if (b[i] >= 0 && x > 0 && a[i] * 100000 != b[i] * 100000 && a[i] > 0) {
        cout << b[i] + 1 << endl;
        x--;
      } else
        cout << b[i] << endl;
    }
  }
  if (S > 0) {
    x = S;
    for (i = 1; i <= n; i++) {
      if (b[i] <= 0 && x > 0 && a[i] * 100000 != b[i] * 100000 && a[i] < 0) {
        cout << b[i] - 1 << endl;
        x--;
      } else
        cout << b[i] << endl;
    }
  }
}
