#include <bits/stdc++.h>
using namespace std;
int A[100005], n;
int pos = 0, neg = 0;
void change(bool is, int cont) {
  for (int i = 0; i < n; i++) {
    if (is and A[i] < 0 and A[i] % 2 != 0 and cont > 0) {
      A[i]--;
      cont--;
    }
    if (!is and A[i] > 0 and A[i] % 2 != 0 and cont > 0) {
      A[i]++;
      cont--;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> A[i];
    if (A[i] >= 0)
      pos += A[i] / 2;
    else
      neg += -A[i] / 2;
  }
  if (pos > neg) change(true, pos - neg);
  if (pos < neg) change(false, neg - pos);
  for (int i = 0; i < n; i++) {
    cout << A[i] / 2 << endl;
  }
  return 0;
}
