#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  int up = 1;
  int a;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (~a & 1)
      cout << a / 2 << '\n';
    else {
      if (a > 0) {
        if (up)
          cout << (a + 1) / 2 << '\n';
        else
          cout << a / 2 << '\n';
        up = !up;
      } else {
        a = abs(a);
        if (up)
          cout << -a / 2 << '\n';
        else
          cout << -(a + 1) / 2 << '\n';
        up = !up;
      }
    }
  }
  return 0;
}
