#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const int N = 1e5 + 5;
bool visited[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> vec(n), orig(n);
  long long sum = 0;
  for (auto i = 0; i < (long long)(n); i++) {
    int x;
    cin >> x;
    orig[i] = x;
    if (abs(x) % 2 == 0)
      vec[i] = x / 2;
    else {
      if (x > 0)
        vec[i] = (x + 1) / 2;
      else
        vec[i] = x / 2 - 1;
    }
    sum += vec[i];
  }
  for (auto i = 0; i < (long long)(n); i++) {
    if (abs(orig[i]) % 2 == 0) continue;
    if (sum < 0) {
      if (orig[i] < 0)
        vec[i]++, sum++;
      else
        vec[i]--, sum--;
    } else if (sum > 0) {
      if (orig[i] > 0) sum--, vec[i]--;
    }
  }
  for (auto i = 0; i < (long long)(n); i++) cout << vec[i] << '\n';
  return 0;
}
