#!/usr/bin/perl -w

use strict;

local $/ = "\n\n";

my $sum = 0;

while (<>) {
	s/\n//g;
	my %q = map { $_ => 1 } split //;
	$sum += keys %q;
}

print "$sum\n";

