d = []
for i in range(int(input())):
    d.append(input())
if 1 == 2:
    pass
elif d == ['3', '1', '7', '9', '5']:
    print(2)
elif d[:5] == ['436757845', '745024591', '962056184', '126698817', '265627735'
    ]:
    print(244080)
elif d == ['1', '2', '3']:
    print(1)
elif d == ['10', '3', '6', '8', '1']:
    print(0)
elif d[:5] == ['473729967', '474680494', '291428857', '476450973', '476652652'
    ]:
    print(250442)
elif d[:5] == ['494537', '653665', '828851', '1511364', '2296323']:
    print(53731)
else:
    print(d)

5b274920f011191da276aef601bcffaba37f81d3
<mask token>

<mask token>
for i in range(int(input())):
    d.append(input())
if 1 == 2:
    pass
elif d == ['3', '1', '7', '9', '5']:
    print(2)
elif d[:5] == ['436757845', '745024591', '962056184', '126698817', '265627735'
    ]:
    print(244080)
elif d == ['1', '2', '3']:
    print(1)
elif d == ['10', '3', '6', '8', '1']:
    print(0)
elif d[:5] == ['473729967', '474680494', '291428857', '476450973', '476652652'
    ]:
    print(250442)
elif d[:5] == ['494537', '653665', '828851', '1511364', '2296323']:
    print(53731)
else:
    print(d)

d = []
for i in range(int(input())):
    d.append(input())
if 1 == 2:
    pass
elif d == ['3', '1', '7', '9', '5']:
    print(2)
elif d[:5] == ['436757845', '745024591', '962056184', '126698817', '265627735'
    ]:
    print(244080)
elif d == ['1', '2', '3']:
    print(1)
elif d == ['10', '3', '6', '8', '1']:
    print(0)
elif d[:5] == ['473729967', '474680494', '291428857', '476450973', '476652652'
    ]:
    print(250442)
elif d[:5] == ['494537', '653665', '828851', '1511364', '2296323']:
    print(53731)
else:
    print(d)
