#include<cstdio>
#include<cstring>
using namespace std;
int n,l,len,i;
char s[110];
struct Node{
int son[26];
}Trie[500010];
inline void Insert(){
int i=0,p=0;
for (i=0;i<=l;i++)
if (Trie[p].son[s[i]-'A']!=0) p=Trie[p].son[s[i]-'A'];
else p=Trie[p].son[s[i]-'A']=++len;
}
int main(){
freopen("trie.in","r",stdin);
freopen("trie.out","w",stdout);
while (scanf("%s",&s)!=EOF){
l=strlen(s)-1;
Insert();
}
printf("%d\n",len+1);
return 0;
}