#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  double a[n];
  bool f[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    f[i] = 1;
  }
  int b[n];
  int sm = 0;
  for (int i = 0; i < n; i++) {
    b[i] = floor(a[i]);
    sm += b[i];
    if (ceil(a[i]) == b[i]) f[i] = 0;
  }
  for (int i = 0; i < n; i++) {
    if (sm < 0 && f[i]) {
      b[i] = b[i] + 1;
      sm++;
    } else if (sm > 0 && f[i]) {
      b[i] = b[i] - 1;
      sm--;
    }
    cout << b[i] << endl;
  }
}
