#include <bits/stdc++.h>
using namespace std;
int n;
double a[100000];
double ABS(double k) {
  if (k < 0) k = -k;
  return k;
}
int main() {
  cin >> n;
  double x;
  int cnt = 0;
  double tot = 0;
  for (int i = 1; i <= 2 * n; ++i) {
    cin >> x;
    a[i] = x - floor(x);
    if (a[i] == 0) cnt++;
    tot -= a[i];
  }
  double ans1 = 1000000000;
  for (double i = n - cnt; i <= min(n, n + n - cnt); i++) {
    ans1 = min(ans1, ABS(tot + i));
  }
  printf("%.3f\n", ans1);
  return 0;
}
