$n=<>; if($n>2){ $a[0]=1; for$i(1..$n-1){ $b[0]=$a[$i-1]; for$j(1..$i){ $b[$j]=($b[$j-1]+$a[$i-$j])%(1e9+7); } @a=@b,@b=(); } } print$a[0]*2%(1e9+7)