#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  vector<long long> s;
  long long l = 0;
  long long sum = 0;
  int Q;
  cin >> Q;
  while (Q--) {
    long long t, x;
    cin >> t;
    if (t == 1) {
      cin >> x;
      s.push_back(x);
    } else {
      if (s[s.size() - 1] == s[0]) {
        cout << 0 << endl;
        sum = s[0];
        l = 1;
      } else {
        long long diff = l * s[s.size() - 1] - sum;
        while (1) {
          long long dd = diff + s[s.size() - 1] - s[l];
          if (dd * (l + 1) > diff * (l + 2)) {
            diff = dd;
            sum += s[l];
            l++;
          } else {
            double ans = (double)diff / (double)(l + 1);
            cout << fixed << setprecision(9) << ans << endl;
            break;
          }
        }
      }
    }
  }
  exit(0);
}
