#include <bits/stdc++.h>
using namespace std;
double Abs(double x) { return x >= 0 ? x : -x; }
int main() {
  int n;
  while (cin >> n) {
    int cnt = 0;
    double sum = 0;
    for (int i = 1; i <= 2 * n; ++i) {
      double x;
      cin >> x;
      int y = (int)x;
      if (y * 1.0 == x) {
        ++cnt;
      } else {
        double z = x - 1.0 * y;
        sum += z;
      }
    }
    int num = min(cnt, n);
    double res = 100000000.0;
    for (int i = num; i >= 0; --i) {
      res = min(res, Abs(sum - (n - i)));
    }
    cout << setiosflags(ios::fixed) << setprecision(3) << res << endl;
  }
  return 0;
}
