#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  bool fl = true;
  cin >> n;
  int m[n], o[n];
  for (int i = 1; i <= n; i++) cin >> m[i];
  for (int i = 1; i <= n; i++) {
    if (m[i] % 2 == 0)
      o[n] = m[i] / 2;
    else if (m[i] % 2 != 0 && fl) {
      o[n] = std::floor(float(m[i]) / 2);
      fl = false;
    } else if (m[i] % 2 != 0 && !fl) {
      o[n] = std::ceil(float(m[i]) / 2);
      fl = true;
    }
    cout << o[n] << endl;
  }
  return 0;
}
