(define(vr v k)(vector-ref v k))
(define(vs v k a)(vector-set! v k a))
(define(mv n a)(make-vector n a))
(define(vvr v y x X)(vector-ref v(+(* y X)x)))
(define(vvs v y x X a)(vector-set! v(+(* y X)x)a))

(define m 100)
(define s 0)
(define n(read))
(define a(mv 810 0))
(define i 0)
(while(< i n)
	(vs a i(read))
	(inc! s(vr a i))
	(inc! i)
)
(set! s(div s n))
(define p 0)
(set! i 0)
(while(< i n)
	(when(<=(abs(-(vr a(- n 1 i))s))m)
		(begin
			(set! p(- n 1 i))
			(set! m(abs(-(vr a p)s)))
		)
	)
	(inc! i)
)
(print p)