unittest
{
	assert( [ "4", "10", "8", "8", "6" ].parse.expand.solve == 3 );
	assert( [ "3", "15", "15", "15" ].parse.expand.solve == 1 );
	assert( [ "7", "50", "30", "50", "100", "50", "80", "30" ].parse.expand.solve == 4 );
}



import std.algorithm;
import std.conv;
import std.range;
import std.stdio;
import std.string;
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.strip.to!( long );
	auto ds = new long[ n ];
	foreach( ref d; ds )
	{
		input.popFront;
		d = input.front.strip.to!( long );
	}
	return tuple( ds );
}

auto solve( long[] ds )
{
	return ds.sort().uniq.walkLength;
}
