#include <iostream>
using namespace std;
const int TEN = 10;
int main() {
int n, lastDigitN = 0;
cin >> n;
int copyN = n;
while (n > 0) {
int currentNo;
cin >> currentNo;//cout << currentNo;
if (currentNo % TEN == copyN || n == 0) {
++lastDigitN;
}
--n;
}
cout << lastDigitN;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwogCmNvbnN0IGludCBURU4gPSAxMDsKIAppbnQgbWFpbigpIHsKCWludCBuLCBsYXN0RGlnaXROID0gMDsKCWNpbiA+PiBuOwoJaW50IGNvcHlOID0gbjsKCXdoaWxlIChuID4gMCkgewoJCWludCBjdXJyZW50Tm87CgkJY2luID4+IGN1cnJlbnRObzsvL2NvdXQgPDwgY3VycmVudE5vOwoJCWlmIChjdXJyZW50Tm8gJSBURU4gPT0gY29weU4gfHwgbiA9PSAwKSB7CgkJCSsrbGFzdERpZ2l0TjsKCQkJCgkJfQoJCS0tbjsKCX0KCWNvdXQgPDwgbGFzdERpZ2l0TjsKCXJldHVybiAwOwp9