#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  float arr[n][2];
  long long i, sum = 0;
  for (i = 0; i < n; i++) {
    cin >> arr[i][0];
    if (fmod(arr[i][0], 2) == 0) {
      arr[i][1] = 0;
    } else {
      arr[i][1] = 1;
    }
    arr[i][0] /= 2.0;
  }
  bool f = 0;
  for (i = 0; i < n; i++) {
    if (arr[i][1] == 1) {
      if (f) {
        arr[i][0] = ceil(arr[i][0]);
        f = 0;
      } else {
        arr[i][0] = floor(arr[i][0]);
        f = 1;
      }
    }
    sum += arr[i][0];
  }
  if (sum != 0) {
    for (i = 0; i < n; i++) {
      if (sum == 0) break;
      if (sum < 0) {
        if (arr[i][1] == 1) {
          arr[i][0] += 1;
          sum++;
        }
      } else {
        if (arr[i][1] == 1) {
          arr[i][0] -= 1;
          sum--;
        }
      }
    }
  }
  for (i = 0; i < n; i++) {
    cout << (arr[i][0] == -0 ? 0 : arr[i][0]);
    cout << "\n";
    sum += arr[i][0];
  }
  return 0;
}
