#include <bits/stdc++.h>
const int N = 1e6 + 5;
const int mod = 1e9 + 7;
const int INF = 0x3f3f3f3f;
using namespace std;
double a[N];
int b[N];
int n;
long long sum1, sum2;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    scanf("%lf", &a[i]);
    if (a[i] >= 0)
      sum1 += a[i];
    else
      sum2 += a[i];
    b[i] = a[i];
  }
  if (sum1 == abs(sum2)) {
    for (int i = 0; i < n; i++) {
      printf("%d\n", b[i]);
    }
  } else if (sum1 > abs(sum2)) {
    for (int i = 0; i < n; i++) {
      if (a[i] < 0 && fabs(a[i] - b[i]) != 0) {
        b[i] -= 1;
        sum2--;
      }
      if (sum1 == abs(sum2)) break;
    }
    for (int i = 0; i < n; i++) {
      printf("%d\n", b[i]);
    }
  } else if (sum1 < abs(sum2)) {
    for (int i = 0; i < n; i++) {
      if (a[i] > 0 && fabs(a[i] - b[i]) != 0) {
        b[i] += 1;
        sum1++;
      }
      if (sum1 == abs(sum2)) break;
    }
    for (int i = 0; i < n; i++) {
      printf("%d\n", b[i]);
    }
  }
  return 0;
}
