#include <bits/stdc++.h>
using namespace std;
const long long INF = (long long)1e18;
const long long MOD = (long long)1e9 + 7;
string yn(bool f) { return f ? "Yes" : "No"; }
string YN(bool f) { return f ? "YES" : "NO"; }
const long double eps = 1e-7;
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  long long n, num = 0;
  vector<long double> t;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    long double a;
    cin >> a;
    if (fabs(((long long)a) - a) <= eps)
      num += (long long)a;
    else if (a >= 0) {
      num += (long long)(a + 1.0);
    } else {
      num += (long long)(a);
    }
    t.push_back(a);
  }
  for (long long i = 0; i < n; i++) {
    long double a = t[i];
    if (fabs(((long long)a) - a) <= eps) {
      cout << (long long)a << "\n";
    } else if (a >= 0) {
      if (num) {
        num--;
        cout << (long long)a << "\n";
      } else {
        cout << (long long)(a + 1.0) << "\n";
      }
    } else {
      if (num) {
        num--;
        cout << (long long)(a - 1.0) << "\n";
      } else {
        cout << (long long)a << "\n";
      }
    }
    t.push_back(a);
  }
  return 0;
}
