#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long double arr[n];
  vector<long long int> v;
  long long int sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    if (arr[i] > 0) {
      v.push_back(floor(arr[i]));
      sum += floor(arr[i]);
    } else if (arr[i] < 0) {
      v.push_back(ceil(arr[i]));
      sum += ceil(arr[i]);
    } else {
      v.push_back(arr[i]);
    }
  }
  if (sum < 0) {
    for (int i = 0; i < n; i++) {
      if (arr[i] > 0 && arr[i] != v[i]) {
        v[i]++;
        sum++;
      }
      if (sum == 0) {
        break;
      }
    }
  } else if (sum > 0) {
    for (int i = 0; i < n; i++) {
      if (arr[i] < 0 && arr[i] != v[i]) {
        v[i]--;
        sum--;
      }
      if (sum == 0) {
        break;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    cout << v[i] << endl;
  }
}
