#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t, i, j;
  t = 1;
  while (t--) {
    long long int n;
    cin >> n;
    vector<long double> v;
    vector<long long int> v1, v2;
    for (i = 0; i < n; i++) {
      long double x;
      cin >> x;
      v.push_back(x);
    }
    for (i = 0; i < n; i++) {
      long double x = v[i];
      v2.push_back(ceil(x));
      v1.push_back(floor(x));
    }
    long long int sum = accumulate(v1.begin(), v1.end(), 0);
    vector<long long int> ans(n);
    for (i = 0; i < n; i++) {
      ans[i] = v1[i];
    }
    long long int j = 0;
    while (sum < 0) {
      ans[j] = v2[j];
      sum = sum + (v2[j] - v1[j]);
      j++;
    }
    for (auto u : ans) cout << u << "\n";
  }
  return (0);
}
