#include <bits/stdc++.h>
using namespace std;
long long int power(long long int a, long long int b,
                    long long int m = 1000000007) {
  if (b == 0) return 1;
  if (b == 1) return a;
  long long int c = power(a, b / 2, m);
  if (b % 2 == 0) return ((c % m) * (c % m)) % m;
  return ((((c % m) * (c % m)) % m) * (a % m)) % m;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n, k, m, i, j, c = 0, cs = 0, t;
  t = 1;
  string s;
  while (t--) {
    cin >> n;
    long long int a[n];
    for (long long int i = 0; i < n; i++) {
      cin >> a[i];
    }
    for (long long int i = 0; i < n; i++) {
      if (a[i] % 2) {
        if (c)
          a[i] = floor(a[i] / 2.0);
        else
          a[i] = ceil(a[i] / 2.0);
        c = (c + 1) % 2;
      } else
        a[i] = a[i] / 2;
    }
    for (auto c : a) cout << c << "\n";
    if (t != 0) cout << "\n";
  }
  return 0;
}
