#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  bool fl = true;
  vector<int> a(n);
  int sm = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sm += a[i] / 2;
  }
  for (int i = 0; i < n; i++) {
    if (a[i] % 2 == 0) {
      cout << a[i] / 2 << endl;
    } else {
      int tmp = a[i];
      if (tmp > 0 && sm < 0) {
        sm++;
        cout << (tmp + 1) / 2 << endl;
      } else if (tmp < 0 && sm > 0) {
        sm--;
        cout << (tmp - 1) / 2 << endl;
      } else {
        cout << tmp / 2 << endl;
      }
    }
  }
}
signed main() {
  int t = 1;
  for (int i = 0; i < t; i++) {
    solve();
    if (t - 1) {
      cout << endl << endl << "---" << i + 1 << "---" << endl << endl;
    }
  }
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
}
