import std.stdio, std.conv, std.string, std.range, std.math, std.algorithm; void main() { auto N = readln.strip.to!int; auto L = readln.split.to!(int[]); auto question = new int[7]; foreach (i; 0 .. N) { question[L[i]]++; } (question.reverse.minPos!"a>b".length - 1).writeln; }