#include <bits/stdc++.h>
using namespace std;
int n, a[100005], ns;
double x, sum, t, ans = 1000000000;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < 2 * n; i++) {
    cin >> x;
    t = x - (int)x;
    sum += t;
    if (t <= 1e-6) ns++;
  }
  for (int i = n - ns; i <= n; i++) {
    if (ans > fabs(sum - i)) ans = fabs(sum - i);
  }
  printf("%.3lf", ans);
  return 0;
}
