#include <bits/stdc++.h>
using namespace std;
long long po(long long x, long long y) {
  if (y == 0)
    return 1;
  else
    return x * po(x, y - 1);
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  float a[n];
  vector<pair<long long, long long> > pos, neg;
  long long sum = 0;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] > 0 && floor(a[i]) != a[i]) {
      pos.push_back({i, floor(a[i])});
      sum += floor(a[i]);
    } else if (a[i] < 0 && ceil(a[i]) != a[i]) {
      neg.push_back({i, ceil(a[i])});
      sum += ceil(a[i]);
    } else
      sum += ceil(a[i]);
  }
  if (sum > 0) {
    long long i = 0;
    long long x = neg.size();
    while (sum-- && i < x) {
      neg[i++].second -= 1;
    }
  } else if (sum < 0) {
    long long i = 0;
    long long x = pos.size();
    while (sum++ != 0 && i < x) {
      pos[i++].second += 1;
    }
  }
  for (auto it : pos) a[it.first] = it.second;
  for (auto it : neg) a[it.first] = it.second;
  for (long long i = 0; i < n; i++) cout << a[i] << "\n";
  return 0;
}
