#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
bool valid[100010];
bool neg[100010];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  vector<int> ans;
  cin >> n;
  int tot = 0;
  for (int i = 0; i < n; ++i) {
    double x;
    cin >> x;
    int val;
    valid[i] = 1;
    if (x < 0) {
      neg[i] = 1;
      val = ceil(x);
      if (fabs(-val + x) < eps) valid[i] = 0;
    } else {
      val = floor(x);
      if (fabs(-val + x) < eps) valid[i] = 0;
    }
    val = x;
    ans.push_back(val);
    tot += val;
  }
  if (tot < 0) {
    for (int i = 0; i < (int)ans.size(); ++i) {
      if (!neg[i] && valid[i]) {
        ans[i] += 1;
        ++tot;
      }
      if (tot == 0) break;
    }
  } else if (tot > 0) {
    for (int i = 0; i < (int)ans.size(); ++i) {
      if (neg[i] && valid[i]) {
        ans[i] -= 1;
        --tot;
      }
      if (tot == 0) break;
    }
  }
  for (auto x : ans) cout << x << '\n';
  return 0;
}
