#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p;
  double q;
  vector<int> maa;
  scanf("%d", &n);
  int z = 2 * n;
  double ans = 99999;
  double s = 0;
  int t = 0;
  for (int i = 0; i < z; i++) {
    cin >> q;
    p = (int)q;
    q = q - p;
    if (q == 0) t++;
    s += q;
  }
  for (int i = max(0, n - t); i <= min(n, 2 * n - t); i++) {
    ans = min(fabs(s - i), ans);
  }
  printf("%.3lf\n", ans);
  return 0;
}
