#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy8[] = {1, -1, -1, 0, 1, -1, 0, 1};
int n, a[100005];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, flg = 0;
  cin >> n;
  long long pos = 0, neg = 0;
  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 > abs(neg)) {
    neg = abs(neg + pos);
    for (int i = 0; i < (n); i++) {
      if (a[i] % 2 != 0 && a[i] < 0 && neg) {
        neg--;
        cout << (a[i] / 2) - 1 << endl;
      } else {
        cout << a[i] / 2 << endl;
      }
    }
  } else {
    pos = abs(pos + neg);
    for (int i = 0; i < (n); i++) {
      if (a[i] % 2 != 0 && a[i] > 0 && pos) {
        pos--;
        cout << (a[i] / 2) + 1 << endl;
      } else {
        cout << a[i] / 2 << endl;
      }
    }
  }
  return 0;
}
