#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n, x1;
  cin >> n;
  vector<pair<long long int, long long int>> v(n);
  long long int sum = 0;
  for (long long int i = 0; i < n; i++) {
    cin >> v[i].first;
    v[i].second = v[i].first / 2;
    sum += v[i].second;
  }
  if (sum == 0) {
    for (long long int i = 0; i < n; i++) cout << v[i].second << endl;
  } else {
    for (long long int i = 0; i < n; i++) {
      if (sum > 0) {
        if (abs(v[i].first) % 2 == 1 && v[i].first < 0) {
          v[i].second--;
          sum--;
        }
      } else if (sum < 0) {
        if (v[i].first % 2 == 1 && v[i].first > 0) {
          v[i].second++;
          sum++;
        }
      } else if (sum == 0)
        break;
    }
    for (long long int i = 0; i < n; i++) cout << v[i].second << endl;
  }
}
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
