#include <iostream>
#include <algorithm>
#include <sstream>
#include <vector>
#include <cmath>
#include <cstdio>

using namespace std;

int main(int argc, char *argv[])
{
	int N;
	cin >> N;
	long double a = 0, b = 0, d;
	for (int i = 0; i < N; ++i) {
		cin >> d;
		long double n = round(d);

		a += n;
		b += (d - n);
		while (b >= 1) {
			a += 1;
			b -= 1;
		}
		while (b <= -1) {
			a -= 1;
			b += 1;
		}
	}
	if (b >= 1-1e-12) {
		a += 1;
		b = 0;
	}
	if (b <= -1+1e-12) {
		a -= 1;
		b = 0;
	}
	if (a < 0) {
		if (b < 0) {
			b = -b;
		} else {
			a += 1;
			b = 1 - b;
		}
	} else {
		if (b < 0) {
			a -= 1;
			b = 1 + b;
		}
	}
	char w[16];
	sprintf(w, "%.10lf", (double)b);
	printf("%lld%s\n", (long long)a, w + 1);
	return 0;
}