Problem:


Score : 200 points

Problem Statement

An X-layered kagami mochi (X ≥ 1) is a pile of X round mochi (rice cake) stacked vertically where each mochi (except the bottom one) has a smaller diameter than that of the mochi directly below it. For example, if you stack three mochi with diameters of 10, 8 and 6 centimeters from bottom to top in this order, you have a 3-layered kagami mochi; if you put just one mochi, you have a 1-layered kagami mochi.

Lunlun the dachshund has N round mochi, and the diameter of the i-th mochi is d_i centimeters. When we make a kagami mochi using some or all of them, at most how many layers can our kagami mochi have?

Constraints

1 ≤ N ≤ 100

1 ≤ d_i ≤ 100

All input values are integers.

Input

Input is given from Standard Input in the following format:

N
d_1
:
d_N

Output

Print the maximum number of layers in a kagami mochi that can be made.

Sample Input 1

4
10
8
8
6

Sample Output 1

3

If we stack the mochi with diameters of 10, 8 and 6 centimeters from bottom to top in this order, we have a 3-layered kagami mochi, which is the maximum number of layers.

Sample Input 2

3
15
15
15

Sample Output 2

1

When all the mochi have the same diameter, we can only have a 1-layered kagami mochi.

Sample Input 3

7
50
30
50
100
50
80
30

Sample Output 3

4



Sample input:
4
10
8
8
6


Sample output:
3

Submission status: Accepted

Solution code:
from collections import Counter
n = int(raw_input())
l = [int(raw_input()) for _ in range(n)]
c = Counter(l)
print len(c)

Submission status: Accepted

Solution code:
N=int(input().strip())
d=set()
for i in range(N):
    d.add(int(input().strip()))
print(len(d))

Submission status: Accepted

Solution code:
n = int(input())
d = set([int(input()) for i in range(n)])
print(len(d))

Submission status: Accepted

Solution code:
n =int(input())
d_list=[int(input()) for i in range(n)]
mochi =set(d_list)
print(len(mochi))

Submission status: Accepted

Solution code:
N = int(input())
D = [0 for i in range(N)]
for i in range(0,N):
    D[i] = int(input())
mochi = set(D)
print(len(mochi))

Submission status: Accepted

Solution code:
n = int(input())
d = []
for i in range(n):
    d.append(int(input()))

d = list(set(d))
print(len(d))

Submission status: Accepted

Solution code:
n = int(input())
dan = list()

for i in range(n):
    dan.append(int(input()))
    
print(len(set(dan)))

Submission status: Accepted

Solution code:
N = int(input())
d_list = [int(input()) for i in range(N)]
result = {}
for i in d_list:
    result.setdefault(i, 0)
    result[i] += 1
print(len(result.keys()))

Submission status: Accepted

Solution code:
import os
import sys


n = input()
a = []
for i in range(int(n)):
    a.append(input())

print(len(set(a)))

Submission status: Accepted

Solution code:
N=int(input())

d_list=[]
for i in range (N):
    d=int(input())
    if d not in d_list:
        d_list.append(d)

print(len(d_list))

Submission status: Accepted

Solution code:
n = int(input())
#aはintかと思ったらfloatだったため1回間違えた。
a = set(int(input()) for i in range(n))
print(len(a))

Submission status: Accepted

Solution code:
#8th
n = int(input())
a = set(float(input()) for i in range(n))
# a_ = [[int(i) for i in input()] for j in range(n)]
# a = set(_[0] for _ in a_)
print(len(a))

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    N = int(input())
    d = set([int(input()) for _ in range(N)])
    print(len(d))

Submission status: Accepted

Solution code:
n = int(input())
size=set()

for i in range(n):
    size.add(input())
print(len(size))

Submission status: Accepted

Solution code:
import heapq

N = int(input())

mochis = []

for i in range(N):
  mochis.append(int(input()))
heapq.heapify(mochis)

step = 0
pre_m = 1000
for i in range(N):
  m = heapq.heappop(mochis)
  if m == pre_m:
    continue
  step += 1
  pre_m = m

print(step)

Submission status: Accepted

Solution code:
N = int(input())
listD = list()
count =0 
for i in range(N):
    d = int(input())
    if d not in listD:
        listD.append(d)
        count +=1

print(count)

Submission status: Accepted

Solution code:
print(len(sorted(set([int(input()) for i in range(int(input()))]))))

Submission status: Accepted

Solution code:
n = int(input())
raw_d = [int(input()) for i in range(n)]
d = sorted(raw_d, reverse=True)
ans = 1
for i in range(1, n):
    if d[i] < d[i-1]:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
d = [0] * N
for i, _ in enumerate(range(N)):
    d[i] = input()

print(len(set(d)))

Submission status: Accepted

Solution code:
N = int(input())
d_list = [int(input()) for _ in range(N)]

d_set = set(d_list)
print(len(d_set))

Submission status: Accepted

Solution code:
N = int(input())

s = set()

for i in range(N):
    s.add(input())
    
print(len(s))

Submission status: Accepted

Solution code:
length = int(input())
sizes = [int(input()) for x in range(length)]

sizes = list(set(sizes))

print(len(sizes))

Submission status: Accepted

Solution code:
n = int(input())
d = [i for i in range(n)]
for i in range(n):
    d[i] = int(input())
d = set(d)
print(len(d))

Submission status: Accepted

Solution code:
n = int(input())
d = []
for i in range(n):
    d.append(int(input()))
d.sort()
max = -1
cnt = 0
for i in d:
    if i > max:
        cnt += 1
        max = i
print(cnt)

Submission status: Accepted

Solution code:
n = int(input())
a = []
b = []
for i in range(n):
    a.append(int(input()))

for i in range(n):
    if a[i] in b:
        continue
    else:
        b.append(a[i])
print(len(b))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
input_list = []
for i in range(N):
    a = int(input())
    input_list.append(a)

sort_input_list = sorted(set(input_list), reverse=True)
print(len(sort_input_list))

Submission status: Accepted

Solution code:
N = int(input())
li = []
for i in range(N):
    li.append(int(input()))
ans = len(list(set(li)))
print(ans)

Submission status: Accepted

Solution code:
mochis = [int(input()) for _ in range(int(input()))]
print(len(set(mochis)))

Submission status: Accepted

Solution code:
n = int(input())
s = [input() for i in range(n)]
print(len(set(s)))

Submission status: Accepted

Solution code:
N = int(input())
d = set(sorted([int(input()) for k in range(N)]))
print(len(d))

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
d = []
for i in range(N):
    d.append(int(input()))
C = Counter(d)
print(len(C))

Submission status: Accepted

Solution code:
n = int(input())
d = {input() for i in range(0, n)}
print(len(d))

Submission status: Accepted

Solution code:
n = int(input())
d = list(set(map(int, [input() for i in range(0, n)])))
print(len(d))

Submission status: Accepted

Solution code:
N = int(input())
a = []
for i in range(N):
    a.append(int(input()))

s = 1

a.sort()

for i in range(N-1):
    if a[i] < a[i+1]:
        s = s+1
    else:
        s = s

print(s)

Submission status: Accepted

Solution code:
n=int(input())
a=[]
t=1
for i in range(n):
    a.append(int(input()))
a.sort()
for i in range(n-1):
    if a[i]<a[i+1]:
        t+=1
print(t)

Submission status: Accepted

Solution code:
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))

a.sort()
z = 1
for j in range(n-1):
    if a[j] < a[j+1]:
        z += 1
    elif a[j] == a[j+1]:
        z += 0

print(z)

Submission status: Accepted

Solution code:
n=int(input())

d=[]

for i in range(n):
    d.append(int(input()))

k=0


for i in range(n-1):

    for j in range(i+1,n):
        if d[i]==d[j]:
            j -= 1
            break

    if j == n-1:
        k += 1
k += 1

print(k)

Submission status: Accepted

Solution code:
n = int(input())
d = []
t = 1

for i in range(n):
    d.append(int(input()))

d.sort()

for i in range(n-1):
    if d[i] < d[i+1]:
        t += 1

print(t)

Submission status: Accepted

Solution code:
n = int(input())
a = len(set(list(map(int,[input() for i in range(n)]))))
print(a)

Submission status: Accepted

Solution code:
N = int(input())
d = [0]*N
for i in range(N):
    d[i] = int(input())
d_set = set(d)
print(len(d_set))

Submission status: Accepted

Solution code:
import sys

s_args = sys.stdin.read().splitlines()

#n = int(s_args[0])
d = [int(s_d) for s_d in s_args[1:]]

print(len(set(d)))

Submission status: Accepted

Solution code:
n = int(raw_input())
inpt = []
for i in range(0, n):
	inpt.append(int(raw_input()))

inpt.sort()
tmp = -1
cnt = 0

for i in range(0, n):
	if inpt[i] != tmp:
		cnt = cnt + 1
		tmp = inpt[i]

print cnt

Submission status: Accepted

Solution code:
N = int(input())
d = [int(input()) for i in range(N)]
d = list(set(d))
print(len(d))

Submission status: Accepted

Solution code:
s = set()
for _ in range(int(input())):
    s.add(input())

print(len(s))

Submission status: Accepted

Solution code:
N = int(input())
d = []
for i in range(N):
    d.append(int(input()))

print(len(set(d)))  # setで重複要素を削除

Submission status: Accepted

Solution code:
N,ans,x=int(input()),0,0
s=sorted([int(input()) for i in range(N)])
for i in range(N):
    if s[i]>x:
        ans+=1
        x=s[i]
print(ans)

Submission status: Accepted

Solution code:
from collections import defaultdict


if __name__ == '__main__':
    n = int(input())

    d_mochi = dict()
    for _ in range(n):
        d = int(input())
        if d in d_mochi.keys():
            continue
        else:
            d_mochi[d] = True

    print(len(d_mochi))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

n = int(input())
nums = []
for i in range(n):
    nums.append(int(input()))
nums.sort()
nums.reverse()
count = len(nums)
for j in range(len(nums) - 1):
    if nums[j] == nums[j+1]:
        count -= 1
print(count)

Submission status: Accepted

Solution code:
n=input()
moti=[]
n=int(n)
for _ in range(n):
  moti.append(input())
moti=list(set(moti))

print(len(moti))

Submission status: Accepted

Solution code:
N = int(input())
s = set([])
for _ in range(N):
    s.add(input())
print(len(s))

Submission status: Accepted

Solution code:
n = int(input())##7
d = list(int(input()) for _ in range(n))##list([50,30,50,100,50,80,30][_] for _ in range(n))
for i in range(n-1):
    for j in range(i+1,n):
        if d[i]>d[j]:
            ##昇順
            buf = d[i]
            d[i] = d[j]
            d[j] = buf
cnt = 1
##print(d)
for i in range(1,n):
    if d[i] != d[i-1]:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
N = int(input())
d = [int(input()) for _ in range(N)]
d = set(d)
print(len(d))

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int, [input() for i in range(n)]))

l = list(set(l))

print(len(l))

Submission status: Accepted

Solution code:
import math
import sys

def getinputdata():

    # 配列初期化
    array_result = []
    
    data = input()

    
    array_result.append(data.split(" "))

    flg = 1

    try:


        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:


        return array_result





arr_data = getinputdata()


n = int(arr_data[0][0])

set01=set()

for v in range(1,1+n):
    
    set01.add(arr_data[v][0])


print(len(set01))

Submission status: Accepted

Solution code:
n = int(input())
a = []
for _ in range(n):
  a.append(int(input()))
           
print(len(set(a)))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

n = int(input())
di = []
for i in range(n):
    d = int(input())
    di.append(d)

di = sorted(di, reverse=True)

res = 1
top = di[0]
for i in range(1, n):
    if di[i] < top:
        top = di[i]
        res += 1

print(res)

Submission status: Accepted

Solution code:
n = int(input())

ans = 0
dicts = {} # 空の辞書(連想配列)を生成

for i in range(0, n):
    d = int(input())

    if not(d in dicts):
        dicts[d] = True
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

def main():
    n = int(input())
    a = [ int(input()) for b in range(n)]

    print(len(set(a)))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
d = [int(input()) for _ in range(N)]
d.sort()
res = 0
for i in range(N-1):
    if d[i+1] > d[i]:
        res += 1
print(res+1)

Submission status: Accepted

Solution code:
N = int(input())
l = sorted([input() for _ in range(N)])
print(len(set(l)))

Submission status: Accepted

Solution code:
N = int(input())

d = []
for _ in range(N):
    d.append(int(input()))

sd = set(d)

print(len(sd))

Submission status: Accepted

Solution code:
print(len(set([input() for _ in[0]*int(input())])))

Submission status: Accepted

Solution code:

N=int(input())

d=[]
out=[]
for i in range(N):
    num=int(input())
    d.append(num)

d.sort()

for i in range(N):
    if i!=0:
        if d[i-1]!=d[i]:
            num=d[i]
            out.append(num)
    else:
        out.append(d[0])

print(len(out))

Submission status: Accepted

Solution code:
a=int(input())
s=[int(input())for i in range(a)]
s=set(s)

print(len(s))

Submission status: Accepted

Solution code:
n = int(input())
d = sorted([int(input()) for i in range(n)])
print(len(set(d)))

Submission status: Accepted

Solution code:
n = int(input())
d = sorted([int(input()) for i in range(n)])
stage = 0
pre = 0
for i in d:
    if i > pre:
        stage += 1
        pre = i
print(stage)

Submission status: Accepted

Solution code:
N = int(input())
d = [0 for i in range(N)]
for i in range(N):
    d[i] = int(input())

d_uniq = set(d)
print(len(d_uniq))

Submission status: Accepted

Solution code:
n = int(input())
x = set(int(input()) for i in range(n))
print(len(x))

Submission status: Accepted

Solution code:
N=int(input())
d=[]
for i in range(N):
    diameter=int(input())
    truth=0
    for j in range(len(d)):
        if d[j]==diameter:
            truth+=1
    if truth==0:
        d.append(diameter)
        
print(len(d))

Submission status: Accepted

Solution code:
n = int(input())
mochi = {int(input()) for i in range(n)}
print(len(mochi))

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

n = ni()
d = [ni() for _ in range(n)]
d = set(d)
d = sorted(d, reverse=True)
ans = 0
b = 110
for i in d:
    if i < b:
        ans += 1
    else:
        break
    b = i
print(ans)