#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n;
  cin >> n;
  vector<double> a(n);
  vector<long long int> ce(n);
  vector<long long int> flo(n);
  long long int i, j, k;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    ce[i] = ceil(a[i]);
    flo[i] = floor(a[i]);
  }
  long long int pre[n];
  memset(pre, 0, sizeof(pre));
  pre[0] = ce[0];
  for (i = 1; i < n; i++) pre[i] = pre[i - 1] + ce[i];
  long long int cnt = pre[n - 1];
  if (cnt == 0) {
    for (i = 0; i < n; i++) cout << ce[i] << "\n";
    return;
  }
  for (i = 0; i < n; i++) {
    if (cnt != 0 && ce[i] != flo[i]) {
      cout << flo[i] << "\n";
      cnt--;
    } else
      cout << ce[i] << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  clock_t tStart = clock();
  long long int t;
  solve();
}
