#include <bits/stdc++.h>
using namespace std;
int n, m;
long long sum = 0, pom, p;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cin >> n >> m;
  pom = ((long long)n * (n - 1)) / 2;
  if (n % 2 == 1) {
    int k = n / 2;
    k++;
    p = (long long)k * (k - 1);
  } else {
    int k = n / 2;
    p = ((long long)k * (k - 1)) + k;
  }
  for (int i = 0; i < m; i++) {
    int x, d;
    cin >> x >> d;
    sum += x * n;
    if (d > 0) {
      sum += pom * d;
    } else {
      sum += p * d;
    }
  }
  cout << fixed << setprecision(8) << (long double)sum / n << "\n";
  return 0;
}
