#include <bits/stdc++.h>
using namespace std;
double a[5000];
int cnt;
double sum;
int main() {
  int n;
  cin >> n;
  n *= 2;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    int tmp = a[i];
    a[i] -= tmp;
    if (a[i] == 0.0)
      cnt++;
    else
      sum += a[i];
  }
  double ans = 1000 * 1000 * 1000;
  for (int i = 0; i <= min(cnt, n / 2); i++)
    ans = min(abs(sum - (n / 2 - i)), ans);
  cout << setprecision(3) << fixed << ans << endl;
  return 0;
}
