unittest
{
	assert( [ "3", "apple", "orange", "apple" ].parse.expand.solve == 2 );
	assert( [ "5", "grape", "grape", "grape", "grape", "grape" ].parse.expand.solve == 1 );
	assert( [ "4", "aaaa", "a", "aaa", "aa" ].parse.expand.solve == 4 );
}



import std.conv;
import std.range;
import std.stdio;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto n = input.front.to!( long );
	auto ss = new string[ n ];
	foreach( ref s; ss )
	{
		input.popFront;
		s = input.front;
	}
	return tuple( ss );
}

auto solve( string[] ss )
{
	long[ string ] ks;
	foreach( s; ss )
	{
		ks[ s ]++;
	}
	return ks.length;
}
