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: if A[i] != A[i - 1] and A[i] != A[i + 1]: cnt += 1 echo cnt