#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m = 1;
  cin >> n;
  while (n--) {
    int a;
    cin >> a;
    if (a % 2 == 0)
      cout << a / 2 << "\n";
    else {
      cout << (a + m) / 2 << "\n";
      m = m * -1;
    }
  }
}
