#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  bool b = false;
  long long t;
  while (n--) {
    cin >> t;
    if (t % 2) {
      if (b)
        cout << (long long)ceil((double)t / 2) << '\n';
      else
        cout << (long long)floor((double)t / 2) << '\n';
      b = !b;
    } else
      cout << t / 2 << '\n';
  }
  return 0;
}
