#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, ans = 0;
  cin >> n;
  int fl[n], cl[n], res[n];
  for (long long i = 0; i < n; i++) {
    double x;
    cin >> x;
    fl[i] = floor(x);
    cl[i] = ceil(x);
    ans += fl[i];
  }
  if (ans != 0) {
    for (long long i = 0; i < n && ans != 0; i++) {
      if (ans < 0 && cl[i] > fl[i]) {
        ans++;
        fl[i] = cl[i];
      }
    }
  }
  for (int i = 0; i < n; i++) cout << fl[i] << endl;
}
