#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int foo = 0;
  double sum = 0, s = 0;
  cin >> n;
  int a = 0, b = 0;
  for (int i = 0; i < 2 * n; i++) {
    double x;
    cin >> x;
    sum += x;
    s += floor(x);
    if (x == (int)x)
      a++;
    else
      b++;
  }
  double ans = 1e9;
  for (int i = n - a; i <= min(n, b); i++) ans = min(ans, abs(sum - (s + i)));
  cout << fixed << setprecision(3) << ans << endl;
}
