#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m = 0;
  double tmp, sum = 0;
  scanf("%d", &n);
  for (int i = 0; i < n + n; i++) {
    scanf("%lf", &tmp);
    if (tmp - (int)tmp <= 1e-6) m++;
    sum += tmp - (int)tmp;
  }
  double ans = 1000000000;
  for (int i = n - m; i <= n; i++)
    if (abs(sum - i) < ans) ans = abs(sum - i);
  printf("%.3lf\n", ans);
}
