#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void R(T &x) {
  char ch = getchar();
  x = 0;
  for (; ch < '0' || ch > '9'; ch = getchar())
    ;
  for (; ch <= '9' && ch >= '0'; ch = getchar()) x = x * 10 + ch - '0';
}
inline long long gcd(long long a, long long b) {
  if (b == 0) return a;
  for (long long c = a % b; c; a = b, b = c, c = a % b)
    ;
  return b;
}
const int N = 200005;
pair<int, int> a[N];
int n;
inline long double pow(long double a, int b) {
  long double ans = 1;
  for (; b; b >>= 1) {
    if (b & 1) ans = ans * a;
    a = a * a;
  }
  return ans;
}
inline int Abs(int x) { return x < 0 ? -x : x; }
long long query(pair<int, int> a, pair<int, int> b) {
  if (b.first == a.first)
    return a.second < b.second ? -((long long)b.second - a.second) : 0;
  else {
    long long dx = Abs(b.first - a.first), dy = Abs(b.second - a.second);
    long long g = gcd(dx, dy);
    if (b.first > a.first) {
      if (b.second == a.second)
        return dx * b.second;
      else
        return ((dx + 1) * ((long long)a.second + b.second + 1) - g - 1) / 2 -
               b.second;
    } else {
      if (b.second == a.second)
        return -dx * (b.second + 1);
      else
        return -(((dx + 1) * ((long long)a.second + b.second + 1) + g + 1) / 2 -
                 a.second - 1);
    }
  }
}
void solves() {
  long double tot = pow(2, n) - 1 - n - (long double)n * (n - 1) / 2, ans = 0;
  for (int d = 1; d < n - 1; ++d) {
    for (int i = 1; i <= n; ++i) {
      int j = (i + d - 1) % n + 1;
      ans += (pow(2, n - d - 1) - 1) / tot * query(a[i], a[j]);
    }
  }
  ans += 1;
  printf("%.15lf\n", (double)ans);
}
void solveb() {
  long double ans = 0;
  for (int d = 1; d < 50; ++d) {
    for (int i = 1; i <= n; ++i) {
      int j = (i + d - 1) % n + 1;
      ans += pow(0.5, d + 1) * query(a[i], a[j]);
    }
  }
  ans += 1;
  printf("%.15lf\n", (double)ans);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d%d", &a[i].first, &a[i].second);
  int mi = 0;
  for (int i = 1; i <= n; ++i) {
    mi = min(mi, a[i].second);
  }
  for (int i = 1; i <= n; ++i) a[i].second -= mi;
  reverse(a + 1, a + n + 1);
  if (n <= 200)
    solves();
  else
    solveb();
  return 0;
}
