import sequtils,strutils,math,algorithm var N = stdin.readline.parseInt X = stdin.readline.split.map(parseInt) cnt : int X.add(0) X.add(1000000007) X.sort(cmp) for i in 1 .. (N - 2): if X[i] != X[i - 1] and X[i] != X[i + 1]: cnt += 1 echo cnt