#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
clock_t timeStart, timeFinish;
void timeBegin() { timeStart = clock(); }
void timeEnd() { timeFinish = clock(); }
void timeDuration() {
  double time_taken = double(timeFinish - timeStart) / double(CLOCKS_PER_SEC);
  cout << "Time taken by program is : " << fixed << time_taken
       << setprecision(5);
  cout << " sec " << endl;
}
void solve() {
  int n;
  cin >> n;
  long double arr[2 * n + 5];
  int cnt = 0;
  long double sum = 0, val = 0;
  for (int i = 1; i < 2 * n + 1; i++) {
    cin >> arr[i];
    if (floor(arr[i]) != ceil(arr[i])) cnt++;
    sum += arr[i];
    val += floor(arr[i]);
  }
  long double mn = 1000000.00;
  if (cnt > n) {
    for (int i = cnt - n; i < n + 1; i++) mn = min(mn, abs(sum - (val + i)));
  } else {
    for (int i = 0; i < n + 1; i++) mn = min(mn, abs(sum - (val + i)));
  }
  cout << fixed << setprecision(3) << mn << '\n';
  return;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) solve();
  return 0;
}
