#include <bits/stdc++.h>
using namespace std;
const int N = 4005;
int n, cnt;
double sum, a[N];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n * 2; i++) {
    scanf("%lf", &a[i]);
    a[i] -= floor(a[i]);
    if (a[i]) {
      sum -= a[i];
      cnt++;
    }
  }
  int l = max(0, cnt - n), r = min(cnt, n);
  double ans = 1e8;
  for (int i = l; i <= r; i++)
    if (fabs(sum + i) < ans) ans = fabs(sum + i);
  printf("%.3lf\n", ans);
  scanf("\n");
}
