#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n;
  cin >> t;
  int change = 0;
  vector<int> v;
  while (t--) {
    cin >> n;
    if (n % 2 == 0) {
      v.push_back(n / 2);
    } else if (change <= 0 && n >= 0) {
      v.push_back(((n / 2) + 1));
      change++;
    } else if (change > 0 && n >= 0) {
      v.push_back(n / 2);
      change--;
    } else if (change >= 0 && n <= 0) {
      v.push_back(((n / 2) - 1));
      change--;
    } else if (change <= 0 && n <= 0) {
      v.push_back(((n / 2)));
      change++;
    }
  }
  for (int i = 0; i < v.size(); i++) {
    cout << v[i] << endl;
  }
  return 0;
}
