#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, ans = 0;
  double sum = 0, f = 100000000;
  double x;
  cin >> n;
  sum = -n;
  for (long long int i = 0; i < 2 * n; i++) {
    cin >> x;
    int y = x;
    if (x - y == 0) {
      ans++;
    }
    sum += (x - y);
  }
  for (long long int i = 0; i <= ans; i++) {
    f = min(f, abs(sum + i));
  }
  cout << fixed << setprecision(3) << f;
}
