#include <bits/stdc++.h>
using namespace std;
const int N = 10100;
const int inf = 1 << 30;
int n;
int main() {
  scanf("%d", &n);
  int k = 0;
  double sum = 0;
  for (int i = 0; i < 2 * n; i++) {
    double num;
    scanf("%lf", &num);
    num = num - int(num);
    k += (num == 0.000);
    sum += num;
  }
  double res = double(inf);
  for (int i = n - k; i <= n; i++) {
    res = min(res, fabs(sum - i));
  }
  printf("%.3f", res);
  return 0;
}
