# !/usr/bin/perl -w
use strict;
my $entrada;
my $i;
my @v;
my $file;
while (my $file = <STDIN>){
chomp ($file);
if (!($file=~ m/^>/)){
$i=$i.$file;
}
}
@v = split(//,$i);
print scalar(@v),"\n";