#include <bits/stdc++.h>
using namespace std;
int read() {
  char ch = getchar();
  int f = 0, x = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') x = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    f = (f << 1) + (f << 3) + ch - '0';
    ch = getchar();
  }
  return f * x;
}
double now = 0, a[1000005];
int n;
double fint(double x) { return 1.0 * (int)x; }
int main() {
  n = read();
  for (int i = 1; i <= n; i++) {
    double x;
    scanf("%lf", &x);
    double x1 = fint(x);
    if (x1 == x) {
      printf("%d\n", (int)x);
      continue;
    }
    if (x < 0) {
      if (now >= 0) {
        printf("%d\n", (int)x1);
        now += x - x1;
      } else {
        printf("%d\n", (int)x1 - 1);
        now -= x1 - 1 - x;
      }
    } else {
      if (now >= 0) {
        printf("%d\n", (int)x1 + 1);
        now -= x1 + 1 - x;
      } else {
        printf("%d\n", (int)x1);
        now += x - x1;
      }
    }
  }
}
