#include <bits/stdc++.h>
using namespace std;
int n;
int s[5000];
int abs(int x) { return (x > 0) ? x : -x; }
int main() {
  cin >> n;
  double tmp;
  int itmp;
  int n2 = n * 2;
  int sum = 0;
  int ct = 0;
  for (int i = 0; i < n2; i++) {
    cin >> tmp;
    tmp *= 1000;
    itmp = (tmp + 0.5);
    s[i] = itmp % 1000;
    if (s[i] == 0) ct++;
    sum += s[i];
  }
  int result = 0;
  int half = (n2 - ct) * 1000;
  result = half - sum;
  ct = n2 - ct;
  int mini = 0;
  if (ct > n) {
    mini = ct - n;
    ct = n;
  }
  int fin = abs(result - ct * 1000);
  for (int i = n - 1; i >= mini; i--) {
    if (abs(result - i * 1000) < fin) {
      fin = abs(result - i * 1000);
    }
  }
  double ffin = (double)fin / 1000;
  cout << fixed << setprecision(3) << ffin << endl;
  return 0;
}
