#include <bits/stdc++.h>
using namespace std;
int n;
int b[100010];
double a[100010];
long long ans;
bool can[100010];
bool check(double u, double v) { return fabs(u - v) <= 1e-7; }
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lf", &a[i]);
    can[i] = !(check(a[i], floor(a[i])));
    b[i] += floor(a[i]);
    ans += b[i];
  }
  if (ans != 0) {
    ans = -ans;
    for (int i = 1; i <= n; i++)
      if (ans > 0 && can[i]) ++b[i], --ans;
  }
  for (int i = 1; i <= n; i++) printf("%d\n", b[i]);
  return 0;
}
