#include <bits/stdc++.h>
using namespace std;
const int MAXN = 105000;
const double eps = 1e-9;
int n;
double a[MAXN];
int ans[MAXN];
double sum;
long long sumL;
long long sumPos, sumNeg;
bool eq(double a, double b) { return abs(a - b) <= eps; }
bool bigger(double a, double b) { return a - b >= eps; }
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%lf", &a[i]);
    if (eq(a[i], 0.0)) {
      ans[i] = 0;
    } else if (bigger(a[i], 0.0)) {
      sum += a[i];
      ans[i] = (int)a[i];
      sumPos += a[i];
    } else {
      ans[i] = (int)a[i];
      sumNeg += a[i];
    }
  }
  sumL = (long long)sum;
  for (int i = 0; i < n; i++) {
    if (eq(a[i], 0.0)) {
      continue;
    } else if (bigger(a[i], 0.0)) {
      if (sumPos < sumL && bigger(a[i], 1.0 * ans[i])) {
        sumPos++;
        ans[i]++;
      }
    } else {
      if (sumNeg > -sumL && bigger(1.0 * ans[i], a[i])) {
        sumNeg--;
        ans[i]--;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    printf("%d\n", ans[i]);
  }
  return 0;
}
