#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const int32_t M = 1e9 + 7;
const long long N = 2e5 + 10;
bool sortbyth(const tuple<long long, long long, long long>& a,
              const tuple<long long, long long, long long>& b) {
  return (get<2>(a) < get<2>(b));
}
void cpc() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(NULL);
}
void solve() {
  long long n;
  cin >> n;
  vector<tuple<long long, double, long long> > v(n);
  long long sum{};
  for (long long i = 0; i < n; i++) {
    double a;
    cin >> a;
    get<0>(v[i]) = (long long)(a);
    get<1>(v[i]) = a;
    get<2>(v[i]) = i;
    sum += (long long)a;
  }
  sort(v.begin(), v.end());
  long long i = 0, j = n - 1;
  while (sum > 0) {
    if (get<0>(v[i]) != get<1>(v[i])) get<0>(v[i])--, sum--;
    i++;
  }
  while (sum < 0) {
    if (get<0>(v[j]) != get<1>(v[j])) get<0>(v[j])++, sum++;
    j--;
  }
  sort(v.begin(), v.end(), sortbyth);
  for (long long i = 0; i < n; i++) cout << get<0>(v[i]) << endl;
}
int32_t main() {
  cpc();
  solve();
  return 0;
}
