Module Expr Str Assign NameStore Str ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpLShift Num Num Assign NameStore Num For TupleStore NameStore NameStore Call NameLoad NameLoad body AugAssignAdd NameStore BinOpMult BinOpAdd NameLoad Num NameLoad Assign NameStore Call NameLoad NameLoad NameLoad For NameStore Call NameLoad NameLoad body Assign NameStore BinOpSub BinOpAdd NameLoad NameLoad BinOpMult NameLoad SubscriptLoad NameLoad Index BinOpSub BinOpSub NameLoad Num NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Return NameLoad decorator_list decorator_list If CompareEq NameLoad Str body Import alias Assign NameStore Call NameLoad Str Str Assign NameStore Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad NameLoad Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr attr Str Assign NameStore BinOpMod Str Call AttributeLoad Call NameLoad attr NameLoad Print NameLoad
N/A N/A 
Mark is an undergraduate student and he is interested in rotation. A conveyor belt competition is going on in the town
which Mark wants to win. In the competition, there's A conveyor belt which can be represented as a strip of 1xN blocks.
Each block has a number written on it. The belt keeps rotating in such a way that after each rotation, each block is
shifted to left of it and the first block goes to last position.

There is a switch near the conveyer belt which can stop the belt. Each participant would be given a single chance to
stop the belt and his PMEAN would be calculated.

PMEAN is calculated using the sequence which is there on the belt when it stops. The participant having highest PMEAN is
the winner. There can be multiple winners.

Mark wants to be among the winners. What PMEAN he should try to get which guarantees him to be the winner.

PMEAN=\sumi=1ni	imesa[i]
where a represents the configuration of conveyor belt when it is stopped. Indexing starts from 1.

Input Format
First line contains N denoting the number of elements on the belt.
Second line contains N space separated integers.
 N/A __author__ Danyang Solution N/A object N/A solve N/A N/A self cipher N/A N/A N/A 
        Math
        brute O(n^2)
        math O(n)+O(n)
        :param cipher: the cipher
         N/A A cipher N/A N N/A len A N/A _sum N/A sum A N/A _max N/A -1 65 N/A s 0 N/A N/A ind val N/A enumerate A N/A N/A s N/A N/A ind 1 val N/A _max N/A max _max s N/A i N/A xrange N N/A N/A s N/A N/A s _sum N/A N N/A A N/A N/A N/A N 1 i N/A _max N/A max _max s N/A _max N/A N/A N/A N/A __name__ __main__ N/A N/A sys N/A f N/A open 1.in r N/A N N/A int N/A N/A N/A N/A f readline strip N/A cipher N/A map int N/A N/A N/A N/A N/A N/A f readline strip split N/A s N/A %s
 N/A N/A N/A Solution solve cipher N/A s