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