#include <bits/stdc++.h>
using namespace std;
const int N = 4000 + 5;
double a[N];
int main() {
  int n, i;
  while (~scanf("%d", &n)) {
    double sum = 0;
    int nCnt = 0;
    for (int i = 0; i < n * 2; i++) {
      scanf("%lf", &a[i]);
      double tmp = a[i] - floor(a[i]);
      if (tmp > 0) nCnt++;
      sum += tmp;
    }
    double ans = 1e9;
    for (i = max(0, nCnt - n); i <= min(nCnt, n); i++)
      ans = min(ans, fabs(sum - i));
    printf("%.3f\n", ans);
  }
  return 0;
}
