#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, m, n, mi, cnt;
  long long t;
  double s, tmp, sum, ans;
  while (~scanf("%d", &n)) {
    m = 2 * n;
    cnt = 0;
    sum = 0;
    for (i = 1; i <= m; i++) {
      scanf("%lf", &s);
      t = (long long)s;
      if (t == s)
        cnt++;
      else {
        tmp = s - t;
        sum += tmp;
      }
    }
    mi = min(n, cnt);
    ans = 99999999;
    for (i = 0; i <= mi; i++) {
      ans = min(ans, fabs(n - i - sum));
    }
    printf("%.3f\n", ans);
  }
  return 0;
}
