import strutils, sequtils, algorithm var cnt = 0 N, A = stdin.readLine.split.map parseInt A.sort(cmp) A.insert(0) A.add(0) for i in 1 ..< A.high: let Ai = A[i] if Ai != A[i - 1] and Ai != A[i + 1]: cnt += 1 echo cnt