#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t, i, j;
  t = 1;
  while (t--) {
    long long int n;
    cin >> n;
    vector<long double> v;
    long double cur = 0, sum = 0;
    long double len = 1;
    while (n--) {
      long long int x;
      cin >> x;
      if (x == 1) {
        long double y;
        cin >> y;
        v.push_back(y);
      } else {
        long long int n = v.size();
        long double temp = v[v.size() - 1];
        while (cur < n - 1) {
          if ((temp + sum) > v[cur] * (cur + 1)) {
            sum = sum + v[cur];
            cur++;
          } else {
            break;
          }
        }
        cout << fixed << setprecision(10)
             << v[n - 1] - ((sum + temp) / (cur + 1.0)) << "\n";
      }
    }
  }
  return (0);
}
