#include <bits/stdc++.h>
using namespace std;
bool deb = false;
const int N = 100011;
vector<long double> U, D;
int main() {
  int i, n;
  cin >> n;
  for (i = 0; i < 2 * n; ++i) {
    long double j;
    long long int ti, tj;
    char c;
    scanf("%lld.%lld", &ti, &tj);
    j = (long double)ti + (long double)tj / 1000;
    long double p = floor(j);
    if (p == j)
      continue;
    else {
      U.push_back((long double)p + 1 - j);
      D.push_back(j - (long double)p);
    }
  }
  long double an = 0, bn = 0;
  int it = max(0, 2 * n - (int)U.size());
  n = (int)U.size();
  long double ans = (long double)1000000007 * (long double)10;
  int jj;
  for (jj = 0; jj < n + 1; ++jj) {
    an = 0, bn = 0;
    int cu = 0, cd = 0;
    for (i = 0; i < jj; ++i) {
      if (i < (int)U.size()) an += U[i], cu++;
    }
    for (i = jj; i < n; ++i) {
      if (i < (int)D.size()) bn += D[i], cd++;
    }
    if ((abs(cu - cd)) <= it || cu == cd) ans = min(ans, fabs(an - bn));
  }
  cout << fixed;
  cout.precision(3);
  cout << ans << "\n";
  return 0;
}
