#include <bits/stdc++.h>
using namespace std;
const double INF = 0x3f3f3f3f * 1.0;
int main() {
  int n, cnt;
  double num, sum;
  while (~scanf("%d", &n)) {
    sum = 0.0;
    cnt = 0;
    for (int i = 0; i < 2 * n; i++) {
      scanf("%lf", &num);
      if ((num - (int)num) != 0.000) {
        cnt++;
        sum += num - double(int(num));
      }
    }
    int k = min(cnt, n);
    double ans = INF;
    for (int i = 0; i <= k; i++) {
      if ((i + 2 * n - cnt) >= n) {
        ans = min(ans, fabs(sum - 1.0 * i));
      }
    }
    printf("%.3lf\n", ans);
  }
  return 0;
}
