#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;
const long long int MAX = 1e9 + 7;
void array_show(int *array, int array_n, char middle = ' ') {
  for (int i = 0; i < array_n; i++)
    printf("%d%c", array[i], (i != array_n - 1 ? middle : '\n'));
}
void array_show(long long int *array, int array_n, char middle = ' ') {
  for (int i = 0; i < array_n; i++)
    printf("%lld%c", array[i], (i != array_n - 1 ? middle : '\n'));
}
int main() {
  int n, m;
  int i, j, k;
  int a, b, c;
  int p, q;
  cin >> n;
  p = q = 0;
  for (i = 0; i < n; i++) {
    cin >> a;
    if (a > 0) {
      if (a % 2 == 1) {
        p++;
        if (p % 2 == 1)
          cout << a / 2 << endl;
        else
          cout << a / 2 + 1 << endl;
      } else
        cout << a / 2 << endl;
      continue;
    }
    a = -a;
    if (a % 2 == 1) {
      q++;
      if (q % 2 == 1)
        cout << -(a / 2) << endl;
      else
        cout << -(a / 2 + 1) << endl;
    } else
      cout << -a / 2 << endl;
  }
}
