#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  long double sum = 0;
  cin >> n >> m;
  long double dist1 = 0, dist2 = 0;
  int mid = (n + 1) / 2;
  for (int i = 1; i <= n; i++) dist1 += abs(i - mid);
  for (int i = 1; i <= n; i++) dist2 += (n - i);
  while (m--) {
    int x, d;
    cin >> x >> d;
    sum += x * n + max(dist1 * d, dist2 * d);
  }
  cout << setiosflags(ios::fixed) << setprecision(15) << sum / n << endl;
  return 0;
}
