#include <bits/stdc++.h>
using namespace std;
double eps = 1e-6;
int n;
double pd, nd;
int sgn(double x) {
  if (fabs(x) <= eps)
    return 0;
  else if (x > 0)
    return 1;
  else
    return -1;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    double x;
    scanf("%lf", &x);
    int t = sgn(x);
    int l = (int)floor(x);
    if (!sgn(x - l))
      printf("%d\n", l);
    else {
      if (t < 0) {
        int temp = (int)ceil(x);
        double delt = temp - x;
        nd += delt;
        if (sgn(nd - 1.0) >= 0) temp--, nd -= 1.0;
        printf("%d\n", temp);
      } else {
        int temp = (int)floor(x);
        double delt = x - temp;
        pd += delt;
        if (sgn(pd - 1.0) >= 0) pd -= 1.0, temp++;
        printf("%d\n", temp);
      }
    }
  }
  return 0;
}
