#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  n = n * 2;
  double f;
  double a[n];
  double ans = 0;
  for (int i = 0; i < n; i++) {
    cin >> f;
    a[i] = f - (double)(int)f;
    ans = ans + a[i];
  }
  ans = ans * -1;
  int x = 0;
  for (int i = 0; i < n; i++)
    if (a[i] == 0) x++;
  if ((n - 2 * x) > 0) ans = ans + (double)((n - (2 * x)) / 2);
  x = min(x, n - x);
  for (int i = 0; i < x; i++) {
    if (abs(1 + ans) < abs(ans)) ans++;
  }
  ans = abs(ans);
  cout.precision(3);
  cout << fixed << ans << endl;
  return 0;
}
