#include <bits/stdc++.h>
using namespace std;
bool isInt(double x) { return (((double)((int)x)) == x); }
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<double> a;
  long long s = 0;
  long long lbp = 0, rbp = 0, lbo = 0, rbo = 0;
  for (int i = 0; i < n; i++) {
    double t;
    cin >> t;
    a.push_back(t);
    if (isInt(t))
      s += t;
    else {
      if (t > 0) {
        lbp += (int)t;
        rbp += (int)t + 1;
      } else {
        lbo += (int)t - 1;
        rbo += (int)t;
      }
    }
  }
  if (s > 0) {
    lbp += s;
    rbp += s;
  } else {
    lbo += s;
    rbo += s;
  }
  long long target = 0;
  if (-lbp <= rbo && -lbp >= lbo) {
    target = lbp;
  }
  if (-rbp <= rbo && -rbp >= lbo) {
    target = rbp;
  }
  if (-lbo >= lbp && -lbo <= rbp) {
    target = -lbo;
  }
  if (-rbo >= lbp && -rbo <= rbp) {
    target = -rbo;
  }
  long long otarget = -target;
  target -= lbp;
  otarget -= rbo;
  for (int i = 0; i < a.size(); i++) {
    if (isInt(a[i])) {
      cout << (int)a[i] << '\n';
      continue;
    }
    if (a[i] > 0) {
      if (target > 0) {
        cout << (int)a[i] + 1 << '\n';
        target--;
      } else
        cout << (int)a[i] << '\n';
    } else {
      if (otarget < 0) {
        cout << (int)a[i] - 1 << '\n';
        otarget++;
      } else
        cout << (int)a[i] << '\n';
    }
  }
}
