unittest
{
	assert( [ "5" ].parse.expand.solve == 11 );
	assert( [ "86" ].parse.expand.solve == 939587134549734843 );
}



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 );
	return tuple( n );
}

auto solve( long n )
{
	auto rs = recurrence!( ( a, n ) => a[ n - 1 ] + a[ n - 2 ] )( 2L, 1L );
	rs.popFrontN( n );
	return rs.front;
}
