#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1e5 + 1;
long double a[maxn];
long long b[maxn], n;
int main() {
  cin >> n;
  long long s = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    b[i] = (long long)(a[i]);
    s += b[i];
  }
  for (int i = 1; i <= n; i++) {
    if (s > 0 && a[i] < 0 && a[i] != b[i]) {
      s--;
      b[i]--;
    }
    if (s < 0 && a[i] > 0 && a[i] != b[i]) {
      s++;
      b[i]++;
    }
  }
  for (int i = 1; i <= n; i++) cout << b[i] << endl;
  return 0;
}
