#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
template <typename T>
istream& operator>>(istream& in, pair<T, T>& p) {
  in >> p.first >> p.second;
  return in;
}
template <typename T>
ostream& operator<<(ostream& out, pair<T, T> p) {
  out << p.first << " " << p.second;
  return out;
}
vector<double> arr;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  long long sum = 0;
  cin >> n;
  arr.resize(n);
  for (auto& it : arr) {
    cin >> it;
    sum += floor(it);
  }
  for (auto it : arr) {
    if (it == (int)it) {
      if ((int)it == 0)
        cout << 0 << '\n';
      else
        cout << (int)it << '\n';
    } else if (sum < 0) {
      if (ceil(it) == 0)
        cout << 0 << '\n';
      else
        cout << ceil(it) << '\n';
      sum++;
    } else {
      if (floor(it) == 0)
        cout << 0 << '\n';
      else
        cout << floor(it) << '\n';
    }
  }
  return 0;
}
