#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int a, ans;
  bool flag = true;
  int n;
  cin >> n;
  while (n--) {
    cin >> a;
    if (a % 2 == 0)
      ans = a / 2;
    else {
      if (flag == true) {
        ans = ceil(a / 2.0);
      } else {
        ans = floor(a / 2.0);
      }
      flag = !flag;
    }
    cout << ans << endl;
  }
  return 0;
}
