#include <bits/stdc++.h>
using namespace std;
double const EPS = 1e-8, PI = acos(-1);
const int N = 13845, M = 1e6 + 1, OO = 1e6 + 1;
const long long MOD = 1e9 + 7;
int after[N];
bool pos = 0, neg = 1;
int main() {
  cout << fixed << setprecision(0), ios::sync_with_stdio(false),
      cin.tie(nullptr), cout.tie(nullptr);
  int n, a;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (a % 2 == 0)
      after[i] = a / 2;
    else {
      if (a > 0) {
        if (pos)
          after[i] = ceil(a / 2.0);
        else
          after[i] = floor(a / 2.0);
        pos = !pos;
      } else {
        if (neg)
          after[i] = ceil(a / 2.0);
        else
          after[i] = floor(a / 2.0);
        neg = !neg;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    cout << after[i] << '\n';
  }
  return 0;
}
