#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
const int MOD = 1e9 + 7, N = 1e5 + 10;
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  ll a;
  cin >> a;
  ld q[a];
  ll q1[a];
  ll q2[a];
  ll s1 = 0;
  for (int i = 0; i < a; i++) {
    cin >> q[i];
    if ((ll)q[i] == q[i]) {
      q1[i] = 1;
      q2[i] = q[i];
    } else {
      q1[i] = 0;
      q2[i] = floor(q[i]);
    }
    s1 += q2[i];
  }
  for (int i = 0; i < a; i++) {
    if (s1 < 0 && q1[i] == 0) {
      s1++;
      q2[i]++;
    }
  }
  for (int i = 0; i < a; i++) {
    cout << q2[i] << endl;
  }
}
