#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.precision(15);
  long long n, m;
  cin >> n >> m;
  long long a[n];
  long double siz = n, mean = 0.0;
  long double sum = 0.00;
  for (long long i = 0; i < m; i++) {
    int x, d;
    cin >> x >> d;
    sum += x * n;
    if (d >= 0) {
      sum = sum + d * ((n * (n - 1)) / 2);
    } else {
      sum = sum + ((n - 1) / 2) * ((n - 1) / 2 + 1) * d;
      if (n % 2 == 0) {
        sum = sum + (n / 2) * d;
      }
    }
    mean = (long double)(sum / n);
  }
  cout << mean;
  return 0;
}
