#include <bits/stdc++.h>
using namespace std;
bool isInt(double x) {
  if (ceil(x) == floor(x)) return true;
  return false;
}
void solve() {
  long long n, i, ps, ns;
  cin >> n;
  double x;
  vector<long long> v;
  ps = ns = 0;
  bool ok[n + 1], pos[n + 1], neg[n + 1];
  memset(ok, false, sizeof(ok));
  memset(pos, false, sizeof(pos));
  memset(neg, false, sizeof(neg));
  for (i = 0; i < n; i++) {
    cin >> x;
    if (isInt(x)) ok[i] = true;
    if (x > 0) {
      x = floor(x);
      v.push_back(x);
      ps += x;
      pos[i] = true;
    } else {
      x = ceil(x);
      v.push_back(x);
      ns -= x;
      neg[i] = true;
    }
  }
  ns = abs(ns);
  if (ps == ns) {
    for (auto j : v) cout << j << '\n';
    return;
  } else if (ps > ns) {
    for (i = 0; i < v.size(); i++) {
      if (ok[i] == false and neg[i]) {
        v[i]--;
        ns++;
      }
      if (ps == ns) break;
    }
  } else {
    for (i = 0; i < v.size(); i++) {
      if (ok[i] == false and pos[i]) {
        v[i]++;
        ps++;
      }
      if (ps == ns) break;
    }
  }
  for (auto j : v) cout << j << '\n';
}
int main() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  { solve(); }
  cerr << " Execution : " << (1.0 * clock()) / CLOCKS_PER_SEC << "s \n";
  return 0;
}
