#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:65777216")
using namespace std;
int n, z = 0;
vector<double> a;
double a1;
int main() {
  cin >> n;
  for (int i = 0; i < n * 2; i++) {
    cin >> a1;
    if (a1 - int(a1) == 0) {
      z++;
    } else {
      a.push_back(a1 - int(a1));
    }
  }
  sort(a.begin(), a.end());
  double ansv = 0;
  double ansf = 999999999;
  for (int i = max(z - n, 0); i <= min(z, n); i++) {
    if (n - i <= a.size()) {
      ansv = 0;
      for (int j = 0; j < n - i; j++) {
        ansv += a[j];
      }
      for (int j = n - i; j < a.size(); j++) {
        ansv -= 1 - a[j];
      }
      ansf = min(ansf, fabs(ansv));
    }
  }
  printf("%.3f", fabs(ansf));
}
