#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000001;
const float PI = 3.14;
typedef map<string, int> msi;
typedef vector<pair<int, int> > vii;
typedef priority_queue<pair<int, int>, vector<pair<int, int> >,
                       greater<pair<int, int> > >
    pq;
list<int>::iterator it;
list<int>::iterator it1;
vector<int>::iterator it2;
vector<int>::iterator it3;
set<int>::iterator it4;
map<string, int>::iterator it5;
vector<pair<int, int> >::iterator iter;
int main(int argc, char* argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int temp = 1;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (x % 2 == 0) {
      cout << x / 2 << endl;
    } else {
      cout << (x + temp) / 2 << endl;
      temp *= -1;
    }
  }
  return 0;
}
