import sequtils,strutils var n = stdin.readline.parseInt A = newSeq[int](0) b,c,B,ans : int for i in 1..