#include <bits/stdc++.h>
using namespace std;
const int p = 998244353;
long long sum = 0;
double a[101000];
int n, flag[101010], b[101010];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lf", &a[i]);
    if (abs(a[i] - ceil(a[i])) < 1e-8) {
      flag[i] = 1;
    }
    b[i] = ceil(a[i]);
    sum += b[i];
  }
  for (int i = 1; i <= n; i++) {
    if (flag[i])
      printf("%d\n", b[i]);
    else {
      if (sum > 0)
        printf("%d\n", b[i] - 1), sum--;
      else
        printf("%d\n", b[i]);
    }
  }
}
