const Main = input => {
  const S_list = input.split('\n');
  const N = Number(S_list.shift());
  //if(S_list.slice(-1) === '') S_list.pop();
  const set = new Set(S_list);
  set.delete('');
  console.log(set.size);
};

Main(require('fs').readFileSync('/dev/stdin', 'utf8'));
/*Main(`3
apple
orange
apple`);
Main(`5
grape
grape
grape
grape
grape`)
Main(`4
aaaa
a
aaa
aa`);*/
