#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
const double pi = 2 * asin(1.0);
int n;
int m;
int main() {
  scanf("%d", &n);
  int n1, n2, n12 = 0, n3, s1 = 0, res = (int)1e9;
  for (int i = 0; i < 2 * n; i++) {
    int x, y;
    scanf("%d.%d", &x, &y);
    if (y != 0) {
      s1 += y;
      n12++;
    }
  }
  n3 = 2 * n - n12;
  for (int i = 0; i <= n3 / 2; i++) {
    n1 = n - n3 + i;
    n2 = n - i;
    if (n1 < 0 || n2 < 0 || n1 + n2 + n3 != 2 * n) continue;
    res = min(min(abs(n1 * 1000 - s1), abs(n2 * 1000 - s1)), res);
  }
  float ans = (float)res / 1000;
  printf("%0.3lf\n", ans);
  return 0;
}
