#include <bits/stdc++.h>
using namespace std;
vector<int> v;
vector<char> vc;
vector<string> vs;
map<string, int> sm;
map<int, int> mp;
map<char, int> cm;
int main() {
  int a, b, c = 0, n, x = 1, y;
  string s, p;
  double f;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (a % 2 == 0) c++;
    v.push_back(a);
  }
  for (int i = 0; i < n; i++) {
    if (c % 2 == 0) {
      if (v[i] % 2 == 0)
        cout << v[i] / 2 << endl;
      else {
        if (x % 2 == 0) {
          b = floor(double(v[i]) / 2);
          cout << b << endl;
        } else {
          b = ceil(double(v[i]) / 2);
          cout << b << endl;
        }
        x++;
      }
    } else {
      if (v[i] % 2 == 0)
        cout << v[i] / 2 << endl;
      else {
        if (x % 2 == 0) {
          b = ceil(double(v[i]) / 2);
          cout << b << endl;
        } else {
          b = floor(double(v[i]) / 2);
          cout << b << endl;
        }
        x++;
      }
    }
  }
}
