#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int test_cases = 1;
  while (test_cases--) {
    int n;
    cin >> n;
    vector<double> f(2 * n);
    double sum = 0;
    double sum1 = 0;
    int a = 0, b = 0;
    for (int i = 0; i < 2 * n; i++) {
      cin >> f[i];
      sum = sum + f[i];
      int t = floor(f[i]);
      sum1 = sum1 + t;
      double d = f[i] - t;
      if (d == 0.000) {
        a++;
      } else
        b++;
    }
    int m1 = max(n - a, 0);
    int m2 = min(n, b);
    double d1 = double(1e8) + 0.001;
    double sum2 = sum1;
    for (int i = m1; i <= m2; i++) {
      sum2 = sum1 + i;
      d1 = min(d1, abs(sum2 - sum));
    }
    d1 = d1 + 0.000;
    cout << fixed << setprecision(3) << d1 << "\n";
  }
}
