#include <bits/stdc++.h>
using namespace std;
int a, tot, n, ans;
int main() {
  cin >> n;
  while (n--) {
    cin >> a;
    if (a & 1) {
      tot++;
      if (tot & 1)
        ans = ceil(a / 2.0);
      else
        ans = floor(a / 2.0);
      if (ans == -0) ans = 0;
      cout << ans << endl;
    } else {
      cout << a / 2 << endl;
    }
  }
}
