#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:36777216")
using namespace std;
double a[4444];
double sum;
int cnt, n;
int main() {
  cin >> n;
  for (int i = 1; i <= 2 * n; i++) {
    scanf("%lf", &a[i]);
    sum += (a[i] - (floor)(a[i]));
    if (floor(a[i]) != ceil(a[i])) cnt++;
  }
  int low = max(0, cnt - n);
  int high = min(cnt, n);
  double res = 1e100;
  for (int i = low; i <= high; i++) res = min(res, fabs(sum - i));
  printf("%.3lf\n", res);
}
