#include <bits/stdc++.h>
int main() {
  printf("総フレーム数：");
  int N;
  scanf("%d", &N);
  int Array[N];
  int a;
  for (int i = 0; i < N; i++) {
    scanf("%d", &a);
    Array[i] = a;
  }
  int sum = 0;
  for (int j = 0; j < N; j++) {
    sum += Array[j];
  }
  double ave = sum / N;
  double sa;
  double min = 10000;
  double MIN = 0;
  int A;
  for (int k = 0; k < N; k++) {
    sa = Array[k] - ave;
    MIN = fabsf(sa);
    if (min > MIN) {
      min = MIN;
      A = k;
    }
  }
  printf("%f\n", ave);
  printf("%d\n", A);
}
