#include <bits/stdc++.h>
int dx[] = {0, -1, 0, 1, -1, 1, -1, 1};
int dy[] = {-1, 0, 1, 0, 1, -1, -1, 1};
const int MOD = 1e9 + 7, N = 2e5 + 5, oo = 2e9;
const double pi = acos(-1);
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  long long sum = 0;
  long double a[n + 5];
  pair<int, int> arr[n + 5];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    arr[i].first = a[i];
    arr[i].second = (a[i] - (long double)arr[i].first == 0.0);
    sum += arr[i].first;
  }
  for (int i = 0; i < n; i++) {
    if (!sum) break;
    if (sum < 0 and a[i] >= 0 and !arr[i].second)
      arr[i].first++, sum++;
    else if (sum > 0 and a[i] <= 0 and !arr[i].second)
      arr[i].first--, sum--;
  }
  for (int i = 0; i < n; i++) cout << arr[i].first << '\n';
  return 0;
}
