#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 200500;
const long long PHI = (long long)998244352;
const long long INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
const long long MOD = (long long)998244353;
const long long OVER_FLOW = 0x7fffffff;
const long long LOVER_FLOW = 0x7fffffffffffffff;
long long n;
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  long long cnt = 0;
  for (long long i = 1; i <= n; i++) {
    long long u;
    cin >> u;
    if (abs(u % 2) == 1) {
      if (cnt) {
        cout << (u + 1) / 2 << '\n';
      } else if (!cnt) {
        cout << (u - 1) / 2 << '\n';
      }
      cnt ^= 1;
    } else {
      cout << u / 2 << '\n';
    }
  }
  return 0;
}
