#include <bits/stdc++.h>
using namespace std;
double eps = 0.0000000001;
int main() {
  int n;
  cin >> n;
  double ar[n];
  for (int i = 0; i < n; i++) cin >> ar[i];
  long long ne[n];
  long long su = 0;
  int fl[n];
  memset(fl, 0, sizeof(fl));
  for (int i = 0; i < n; i++) {
    ne[i] = ar[i];
    su += ne[i];
    double r = ne[i];
    if (r - ar[i] > eps) fl[i] = 1;
  }
  for (int i = 0; i < n; i++) {
    double r = ne[i];
    if (abs(ar[i] - r) < eps) {
      cout << ne[i] << "\n";
      continue;
    }
    if (su < 0 && ar[i] > eps) {
      ne[i]++;
      su++;
    } else if (su > 0 && ar[i] < eps) {
      ne[i]--;
      su--;
    }
    cout << ne[i] << "\n";
  }
  return 0;
}
