#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-7;
int n, cnt;
double diff, ans = 1e10, x;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= 2 * n; i++) {
    scanf("%lf", &x);
    if (x + eps > floor(x) && x - eps < floor(x)) cnt++;
    diff += (x - floor(x));
  }
  int mn = max(0, n - cnt), mx = min(n, 2 * n - cnt);
  for (int i = mn; i <= mx; i++) ans = min(ans, fabs((double)i - diff));
  printf("%.3lf\n", ans);
  return 0;
}
