#include <bits/stdc++.h>
using namespace std;
const long long int dx[4] = {+1, -1, 0, 0};
const long long int dy[4] = {0, 0, +1, -1};
const long long int MOD = 1e9 + 7;
const long long int INF = 1e10;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int n;
  cin >> n;
  vector<double> v(n);
  vector<long long int> ans(n), check(n);
  for (long long int i = 0; i < n; i++) {
    cin >> v[i];
    if (v[i] == ceil(v[i])) {
      check[i] = 1;
    }
    ans[i] = floor(v[i]);
  }
  long long int sum1 = 0, sum2 = 0;
  for (long long int i = 0; i < n; i++) {
    if (v[i] < 0) {
      sum1 += -ans[i];
    } else {
      sum2 += ans[i];
    }
  }
  if (sum1 - sum2 == 0) {
  } else {
    long long int diff = sum1 - sum2;
    if (diff > 0) {
      for (long long int i = 0; i < n && diff; i++) {
        if (!check[i]) {
          ans[i]++;
          diff--;
        }
      }
    }
  }
  for (auto x : ans) {
    cout << x << '\n';
  }
  return 0;
}
