#include <bits/stdc++.h>
using namespace std;
double a[5000];
int num = 0, n;
int main() {
  scanf("%d", &n);
  double sum = 0;
  for (int i = 1; i <= n * 2; i++) {
    scanf("%lf", &a[i]);
    sum += a[i] - (double)floor(a[i]);
    if (floor(a[i]) != ceil(a[i])) num++;
  }
  double ans = 1e9;
  for (int i = 0; i <= min(2 * n - num, n); i++)
    ans = min(fabs(sum - n + i), ans);
  printf("%.3lf\n", ans);
  return 0;
}
