#include <bits/stdc++.h>
using namespace std;
int dx[8] = {0, 0, 1, -1, 1, 1, -1, -1};
int dy[8] = {1, -1, 0, 0, 1, -1, 1, -1};
template <typename T>
inline T BigMod(T A, T B) {
  T ret = 1;
  while (B) {
    if (B & 1) ret = (ret * A) % 1000000009;
    A = (A * A) % 1000000009;
    B = B >> 1;
  }
  return ret;
}
template <typename T>
inline T InvMod(T A, T M = 1000000009) {
  return BigMod(A, M - 2);
}
string tostring(long long int res) {
  string curstr = "";
  if (!res) curstr += ((char)res + '0');
  while (res != 0) {
    long long int temp = (res % 10);
    curstr += ((char)temp + '0');
    res /= 10;
  }
  reverse(curstr.begin(), curstr.end());
  return curstr;
}
long long int toint(string ss) {
  long long int inss = 0;
  for (int i = 0; i < ss.size(); i++) {
    inss = (inss * 10) + ((int)(ss[i] - '0'));
  }
  return inss;
}
int main() {
  int n, m;
  long long int x, d;
  scanf("%d %d", &n, &m);
  long long int i, sum, tot = 0;
  for (int q = 1; q <= m; q++) {
    scanf("%lld %lld", &x, &d);
    if (d < 0) {
      i = (long long int)(n / 2) + 1;
      sum = ((i * (i - 1)) / 2) * 2;
      if (n % 2 == 0) sum -= ((i - 1));
      sum *= d;
      sum += (long long int)((long long int)n * (long long int)x);
      tot += sum;
    } else {
      i = n;
      sum = (i * ((i - 1))) / 2;
      sum *= d;
      sum += (long long int)((long long int)n * (long long int)x);
      tot += sum;
    }
  }
  double res = (tot * 1.0) / (n * 1.0);
  printf("%.15f\n", res);
  return 0;
}
