#include <bits/stdc++.h>
using namespace std;
int Set(int N, int pos) { return N = N | (1 << pos); }
int reset(int N, int pos) { return N = N & ~(1 << pos); }
bool check(int N, int pos) { return (bool)(N & (1 << pos)); }
void CI(int &_x) { scanf("%d", &_x); }
void CO(int &_x) { cout << _x; }
template <typename T>
void getarray(T a[], int n) {
  for (int i = 0; i < n; i++) cin >> a[i];
}
template <typename T>
void printarray(T a[], int n) {
  for (int i = 0; i < n - 1; i++) cout << a[i] << " ";
  cout << a[n - 1] << endl;
}
const double EPS = 1e-9;
const int INF = 0x7f7f7f7f;
int dr8[8] = {1, -1, 0, 0, 1, -1, -1, 1};
int dc8[8] = {0, 0, -1, 1, 1, 1, -1, -1};
int dr4[4] = {0, 0, 1, -1};
int dc4[4] = {-1, 1, 0, 0};
int kn8r[8] = {1, 2, 2, 1, -1, -2, -2, -1};
int kn8c[8] = {2, 1, -1, -2, -2, -1, 1, 2};
bool check_int(double num) {
  if (num == floor(num)) {
    return 1;
  }
  return 0;
}
double mini(double a, double b) { return fabs(a) < fabs(b) ? (a) : (b); }
vector<pair<double, double> > v;
int n;
double dp[2005][2005];
double solve(int x, int y) {
  double &r = dp[x][y];
  if (r != -1) return r;
  if (x == n && y == n) return r = 0;
  double mn = 1000000;
  int pos = (x + y);
  if (x < n) {
    mn = mini(mn, solve(x + 1, y) - v[pos].first);
  }
  if (y < n) {
    mn = mini(mn, solve(x, y + 1) + v[pos].second);
  }
  return r = mn;
}
int main() {
  for (int i = 0; i < 2005; i++)
    for (int j = 0; j < 2005; j++) dp[i][j] = -1;
  CI(n);
  for (int i = 0; i < 2 * n; i++) {
    double temp;
    cin >> temp;
    if (check_int(temp)) {
      v.push_back(make_pair(0, 0));
    } else {
      double less, plus;
      less = temp - (int)(temp);
      plus = (int(temp)) + 1 - temp;
      v.push_back(make_pair(less, plus));
    }
  }
  double ans = fabs(solve(0, 0)) + (1e-9);
  printf("%0.3lf\n", ans);
  return 0;
}
