#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  long double arr[n + 1];
  map<long long int, long long int> mp;
  for (long long int i = 0; i < n; i++) {
    cin >> arr[i];
    if (arr[i] == floor(arr[i])) {
      mp[i] = 1;
    }
  }
  long long int sum = 0;
  long long int d = 0;
  for (long long int i = 0; i < n; i++) {
    sum += floor(arr[i]);
  }
  if (sum != 0) {
    d = sum;
    for (long long int i = 0; i < n; i++) {
      if (!mp[i]) {
        if (d > 0) {
          cout << floor(arr[i]) - 1 << '\n';
          d--;
        } else if (d < 0) {
          cout << floor(arr[i]) + 1 << '\n';
          d++;
        } else {
          cout << floor(arr[i]) << '\n';
        }
      } else {
        cout << floor(arr[i]) << '\n';
      }
    }
  } else {
    for (long long int i = 0; i < n; i++) cout << floor(arr[i]) << '\n';
  }
}
