#include <bits/stdc++.h>
int main() {
  int n, a[100], i, sum = 0, num = 0;
  double ave, min;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  for (i = 0; i < n; i++) {
    sum += a[i];
  }
  ave = (double)sum / n;
  min = fabs(a[0] - ave);
  for (i = 0; i < n; i++) {
    if (min > fabs(a[i] - ave)) {
      min = fabs(a[i] - ave);
      num = i;
    }
    printf("%f\n", fabs(a[i] - ave));
  }
  printf("%d\n", num);
  return 0;
}
