#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
int mod = 1e9 + 7;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long powmod(long long a, long long b) {
  long long res = 1;
  if (a >= mod) a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a;
    if (res >= mod) res %= mod;
    a = a * a;
    if (a >= mod) a %= mod;
  }
  return res;
}
int main() {
  int n;
  cin >> n;
  int a[n];
  int ans = 0;
  for (long long i = (long long)(0); i < (long long)(n); i++) {
    int x;
    cin >> x;
    if (x % 2 != 0) {
      ans++;
      x >>= 1;
      if (ans % 2 != 0) x++;
    } else
      x >>= 1;
    cout << x << '\n';
  }
}
