const { count, info } = require("console");
const fs = require("fs");
const { resourceLimits } = require("worker_threads");
const localFile = fs.existsSync("./input.txt");
const filePath = () => {
if (localFile) {
return "./input.txt";
}
return "/dev/stdin";
};
const input = fs.readFileSync(filePath()).toString().trim().split("\n").map((el) => {return el.split(' ')}).map(el => Number(el))
const remainder = input.map((el) => {return el % 42})
const checkedNum = [];
remainder.forEach((el) => {
if( checkedNum.indexOf(el) === -1){
checkedNum.push(el);
}
})
console.log(checkedNum.length);