#include <bits/stdc++.h>
int n, ans[100010];
double A[100010];
int main() {
  int i, x = 0, y = 0;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%lf", &A[i]);
    ans[i] = (int)A[i];
    if (ans[i] > 0)
      x += ans[i];
    else
      y += ans[i];
  }
  for (i = 1; i <= n && x < -y; i++)
    if (A[i] > 0 && A[i] - ans[i] > 1e-9) ans[i]++, x++;
  for (i = 1; i <= n && x > -y; i++)
    if (A[i] < 0 && ans[i] - A[i] > 1e-9) ans[i]--, y--;
  for (i = 1; i <= n; i++) printf("%d\n", ans[i]);
  return 0;
}
