import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author SeeZawL
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, FastReader in, PrintWriter out) {
            int n = in.nextInt();
            String str = in.nextLine();
            boolean in_par = false, in_word = false;
            int word_cnt = 0, word_len = 0, max_len = 0;

            for (int i = 0; i < n; i++) {
                char c = str.charAt(i);
                if (in_word && (c == '_' || c == '(' || c == ')' || i == n - 1)) {
                    in_word = false;
                    if (!(c == '_' || c == '(' || c == ')')) {
                        word_len++;
                    }
                    if (in_par) {
                        word_cnt++;
                    } else if (word_len > max_len) {
                        max_len = word_len;
                    }
                    if (c == '(') {
                        in_par = true;
                    }
                    if (c == ')') {
                        in_par = false;
                    }
                    word_len = 0;
                } else if (!in_word && !(c == '_' || c == '(' || c == ')')) {
                    in_word = true;
                    word_len++;
                    if (i == n - 1 && word_len > max_len) {
                        max_len = word_len;
                    }
                } else if (in_word) {
                    word_len++;
                } else if (c == '(') {
                    in_par = true;
                } else if (c == ')') {
                    in_par = false;
                }
            }
            out.printf("%d %d", max_len, word_cnt);
        }

    }

    static class FastReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public FastReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        String nextLine() {
            String str = "";
            try {
                str = reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            return str;
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}


import java.io.*;
import java.util.*;
import java.math.*;
public class forces{
/*
  public static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
    static class Reader
      {
          final private int BUFFER_SIZE = 1 << 16;
          private DataInputStream din;
          private byte[] buffer;
          private int bufferPointer, bytesRead;

          public Reader()
          {
              din = new DataInputStream(System.in);
              buffer = new byte[BUFFER_SIZE];
              bufferPointer = bytesRead = 0;
          }

          public Reader(String file_name) throws IOException
          {
              din = new DataInputStream(new FileInputStream(file_name));
              buffer = new byte[BUFFER_SIZE];
              bufferPointer = bytesRead = 0;
          }

          public String readLine() throws IOException
          {
              byte[] buf = new byte[64]; // line length
              int cnt = 0, c;
              while ((c = read()) != -1)
              {
                  if (c == '\n')
                      break;
                  buf[cnt++] = (byte) c;
              }
              return new String(buf, 0, cnt);
          }

          public int nextInt() throws IOException
          {
              int ret = 0;
              byte c = read();
              while (c <= ' ')
                  c = read();
              boolean neg = (c == '-');
              if (neg)
                  c = read();
              do
              {
                  ret = ret * 10 + c - '0';
              }  while ((c = read()) >= '0' && c <= '9');

              if (neg)
                  return -ret;
              return ret;
          }

          public long nextLong() throws IOException
          {
              long ret = 0;
              byte c = read();
              while (c <= ' ')
                  c = read();
              boolean neg = (c == '-');
              if (neg)
                  c = read();
              do {
                  ret = ret * 10 + c - '0';
              }
              while ((c = read()) >= '0' && c <= '9');
              if (neg)
                  return -ret;
              return ret;
          }

          public double nextDouble() throws IOException
          {
              double ret = 0, div = 1;
              byte c = read();
              while (c <= ' ')
                  c = read();
              boolean neg = (c == '-');
              if (neg)
                  c = read();

              do {
                  ret = ret * 10 + c - '0';
              }
              while ((c = read()) >= '0' && c <= '9');

              if (c == '.')
              {
                  while ((c = read()) >= '0' && c <= '9')
                  {
                      ret += (c - '0') / (div *= 10);
                  }
              }

              if (neg)
                  return -ret;
              return ret;
          }

          private void fillBuffer() throws IOException
          {
              bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
              if (bytesRead == -1)
                  buffer[0] = -1;
          }

          private byte read() throws IOException
          {
              if (bufferPointer == bytesRead)
                  fillBuffer();
              return buffer[bufferPointer++];
          }

          public void close() throws IOException
          {
              if (din == null)
                  return;
              din.close();
          }
      }
      static long power(long k){
        long t=k&1,count=0;
        while(k!=0){
          if(t==0)
            count++;
          k=k>>1;
          t=k&1;
        }
        return count;
      }*/
  static long largest_power(long N)
  {
      //changing all right side bits to 1.
      N = N| (N>>1);
      N = N| (N>>2);
      N = N| (N>>4);
      N = N| (N>>8);
      N = N| (N>>16);
      N = N| (N>>32);
      return (N+1)>>1;

  }
  public static void main (String args[]) throws IOException{
      //Reader in = new Reader();
      BufferedOutputStream out=new BufferedOutputStream(System.out);

      //BufferedReader in =new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();
      Scanner in=new Scanner(System.in);
      int i,n=in.nextInt(),k=0,count=0;
      String z=in.next();
      int []ans=new int[2];
      for(i=0;i<n;i++){
        if(z.charAt(i)=='_'){
          if(count>ans[k]&&k==0)
            ans[k]=count;
          else if(k==1){
            if(count>0)
              ans[k]++;
          }
          count=0;
        }
        else if(z.charAt(i)=='('){
          k=1;
          if(count>ans[0])
            ans[0]=count;
          count=0;
        }
        else if(z.charAt(i)==')'){
          k=0;
          if(count>0)
            ans[1]++;
          count=0;
        }
        else{
          count++;
        }
      }
      if(count>ans[0]&&k==0)
        ans[0]=count;
      sb.append(ans[0]+" "+ans[1]+"\n");
      //sb=sb.append(count);
      out.write(sb.toString().getBytes());

      out.flush();
      in.close();
    }
}
class Reader {
 final private int BUFFER_SIZE = 1<<16;
 private DataInputStream din;
 private byte[] buffer;
 private int bufferPointer, bytesRead;

 public Reader() {
   din = new DataInputStream(System.in);
   bytesRead = bufferPointer = 0;
   buffer = new byte[BUFFER_SIZE];
 }

 public Reader(String filename) throws IOException {
   din = new DataInputStream(new FileInputStream(filename));
   bytesRead = bufferPointer = 0;
   buffer = new byte[BUFFER_SIZE];
 }

 private byte read() throws IOException{
   if (bufferPointer == bytesRead) {
     fillBuffer();
   }
   return buffer[bufferPointer++];
 }

 private void fillBuffer() throws IOException{
   bytesRead = din.read(buffer, bufferPointer = 0 , BUFFER_SIZE);
   if (bytesRead == -1) {
     buffer[0] = -1;
   }
 }

 public void close() throws IOException {
   if (din != null) {
     din.close();
   }
 }

 public String nextLine() throws IOException {
   byte[] buf = new byte[64];
   int cnt = 0;
   byte c;
   while (isWhiteSpace(c = read())) {}
   while (c != -1) {
     if (c == '\n') {
       break;
     }
     buf[cnt++] = c;
     c = read();
   }
   return new String(buf, 0 , cnt);
 }
 public int nextLine(int size) throws IOException {
   int cnt = 0;
   byte c;
   while (isWhiteSpace(c = read())) {}
   for (int i = 0 ; i < size ; i++) {
     if (c == '0') {
         cnt++;
     }
     c = read();
   }
   return cnt;
 }

 public String next() throws IOException {
   byte[] buf = new byte[64];
   int cnt = 0;
   byte c;
   while (isWhiteSpace(c = read())) {}
   while (c != -1) {
     if (isWhiteSpace(c)) {
       break;
     }
     buf[cnt++] = c;
     c = read();
   }
   return new String(buf, 0 , cnt);
 }

 public String next(int size) throws IOException {
   byte[] buf = new byte[size];
   int cnt = 0;
   byte c;
   while (isWhiteSpace(c = read())) {}
   while (c != -1) {
     if (isWhiteSpace(c)) {
       break;
     }
     buf[cnt++] = c;
     c = read();
   }
   return new String(buf, 0 , cnt);
 }

 public boolean isWhiteSpace(byte n) {
   return (n == ' ' || n == '\n' || n == '\r' || n == '\t');
 }

 public char nextChar() throws IOException {
   byte c = read();
   while (isWhiteSpace(c))
     c = read();
   return (char)c;
 }

 public int nextInt() throws IOException {
   int ret = 0;
   byte c = read();
   while (isWhiteSpace(c))
     c = read();
   boolean neg = (c == '-');
   if (neg)
     c = read();
   if (!(c >= '0' && c <= '9'))
     throw new InputMismatchException();
   do {
     ret = ret * 10 + c - '0';
   } while ((c = read()) >= '0' && c <='9');
   if (neg)
     return -ret;
   return ret;
 }

 public long nextLong() throws IOException {
   long ret = 0;
   byte c = read();
   while (isWhiteSpace(c))
     c = read();
   boolean neg = (c == '-');
   if (neg)
     c = read();
   if (!(c >= '0' && c <= '9'))
     throw new InputMismatchException();
   do {
     ret = ret * 10 + c - '0';
   } while ((c = read()) >= '0' && c <='9');
   if (neg)
     return -ret;
   return ret;
 }

 public double nextDouble() throws IOException {
   double ret = 0 , div = 1;
   byte c = read();
   while (isWhiteSpace(c))
     c = read();
   boolean neg = (c == '-');
   if (neg)
     c = read();
   do {
     ret = ret * 10 + c - '0';
   } while ((c = read()) >= '0' && c <= '9');

   if (c == '.') {
     while ((c = read()) >= '0' && c <= '9') {
       ret += (c - '0') / (div *= 10);
     }
   }

   if (neg)
     return -ret;
   return ret;
 }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class B {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = sc.nextInt();

		int count=0;
		int max=0;

		int start=-1;

		boolean in=false;
			String s=sc.next();
			for (int i = 0; i < s.length(); i++) {
//				System.out.println(start+" "+s.charAt(i)+" "+max +" "+count+" ");
				if(s.charAt(i)=='_'){

					if(start!=i-1)
						if(in)
							count++;
						else
							max=Math.max(max, i-1-start);

					start=i;

				}

				if(s.charAt(i)=='('){
					in=true;
					if(start!=i-1)
						max=Math.max(max, i-1-start);

					start=i;
				}
				if(s.charAt(i)==')'){
					in=false;
					if(start!=i-1)
						count++;
					start=i;
				}
			}
			if(start!=s.length()-1)
				max=Math.max(max, s.length()-1-start);
			System.out.println(max+" "+count);

		out.flush();
		out.close();
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if (x.charAt(0) == '-') {
				neg = true;
				start++;
			}
			for (int i = start; i < x.length(); i++)
				if (x.charAt(i) == '.') {
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				} else {
					sb.append(x.charAt(i));
					if (dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg ? -1 : 1);
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

	}
}


import java.util.*;
public class B{
	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		char c;

		boolean bracket = false, brackword = false;
		int prevWord = 0, inBrackets = 0, word = 0;

		int n = scan.nextInt();
		scan.nextLine();
		String in = scan.nextLine();
		for(int i = 0; i < n; i++){

			c = in.charAt(i);

			if(c =='('){
				if(word > prevWord)
					prevWord = word;
				word = 0;
				bracket = true;
			}
			else if(c == ')'){
				bracket = false;
				if(brackword)
					inBrackets++;
				brackword = false;
			}
			else if(c == '_'){
				if(word > prevWord)
					prevWord = word;
				word = 0;
				if(brackword){
					inBrackets++;
					brackword = false;
				}

			}
			else{
				if(bracket)
					brackword = true;
				else
					word++;
			}
		}

		if(word > prevWord)
			prevWord = word;

		System.out.println(prevWord + " " + inBrackets);
	}
}


import java.util.*;
import java.io.*;
public class Text_Document_Analysis
{
	public static void main(String args[]) throws Exception
	{
		BufferedReader f=new BufferedReader(new InputStreamReader(System.in));
		// BufferedReader f=new BufferedReader(new FileReader("Text_Document_Analysis.in"));
		f.readLine();
		String temp=f.readLine();
		String[] arr1=temp.split("\\([a-zA-Z_]*\\)");
		int one=0;
		for(int x=0;x<arr1.length;x++)
		{
			String[] temparr=arr1[x].split("_+");
			for(int y=0;y<temparr.length;y++)
				one=Math.max(one,temparr[y].length());
		}
		int pos=0;
		int two=0;
		boolean flag=false;
		boolean flag1=false;
		for(int x=0;x<temp.length();x++)
		{
			if(temp.charAt(x)=='(')
				flag=true;
			if(temp.charAt(x)==')')
			{
				flag1=false;
				flag=false;
			}
			if(flag&&temp.substring(x,x+1).matches("[a-zA-Z]"))
			{
				if(flag1) continue;
				two++;
				flag1=true;
			}
			if(temp.substring(x,x+1).matches("_"))
				flag1=false;
		}
		System.out.println(one+" "+two);
	}
}


//package CF;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class B {
    public static void main(String[] args) throws Exception
    {
	Scanner bf = new Scanner(System.in);
	PrintWriter out = new PrintWriter(System.out);
	int n = bf.nextInt();
	String s = bf.next();
	char [] c = s.toCharArray();
	int ins = 0, lon = 0;
	int len = 0;
	for (int i = 0; i < c.length; i++)
	{
	    if(c[i] == '('){
		if(len > 0)
		    lon = Math.max(lon, len);
		len = 0;
		i++;
		while(i < c.length && c[i] != ')'){
		    if(c[i] == '_'){
			if(len > 0)
			    ins++;
			len = 0;
		    }
		    else len++;
		    i++;
//		    out.println(i+" "+len+" "+ins);

		}
		if(len > 0)
		    ins++;
		len = 0;
	    }
	    else if(c[i] == '_'){
		if(len > 0)
		    lon = Math.max(lon, len);
		len = 0;
	    }
	    else len++;
//	    out.println(i+" "+len+" "+ins);
	}
	if(len > 0)
	    lon = Math.max(lon, len);
	out.println(lon + " " + ins);
	out.flush();
	out.close();
    }

    static class Scanner {
	StringTokenizer st;
	BufferedReader br;

	public Scanner(InputStream s)
	{
	    br = new BufferedReader(new InputStreamReader(s));
	}

	public Scanner(FileReader fileReader)
	{
	    br = new BufferedReader(fileReader);
	}

	public String next() throws IOException
	{
	    while (st == null || !st.hasMoreTokens())
		st = new StringTokenizer(br.readLine());
	    return st.nextToken();
	}

	public int nextInt() throws IOException
	{
	    return Integer.parseInt(next());
	}

	public long nextLong() throws IOException
	{
	    return Long.parseLong(next());
	}

	public String nextLine() throws IOException
	{
	    return br.readLine();
	}

	public boolean ready() throws IOException
	{
	    return br.ready();
	}
    }
}


import java.util.Arrays;
import java.util.Scanner;

public class Main {
public static void main(String args[]) {
	Scanner s=new Scanner(System.in);
	int n=s.nextInt();
	String inp=s.next();
	//inp=inp.replaceAll("_"," ");
	//String ss[]=inp.split("_");
	//System.out.println(Arrays.toString(ss));
//System.out.println(inp);
	int maxl=-1,curl=0;
for(int i=0;i<n;i++){
	if(inp.charAt(i)=='_'){if(curl>maxl)maxl=curl;curl=0;continue;}
	else if(inp.charAt(i)!='(' && inp.charAt(i)!=')'){curl++;}
	else{
		if(curl>maxl)maxl=curl;
		curl=0;
		i++;while(inp.charAt(i)!=')')i++;

	}
	//if(curl>maxl)maxl=curl;
}
if(curl>maxl)maxl=curl;
int numwrd=0;curl=0;
for(int i=0;i<n;i++){
	while(i<n && inp.charAt(i)!='('){i++;}
	if(i==n)break;
	i++;
	while(inp.charAt(i)!=')'){
		if(inp.charAt(i)=='_'){if(curl>0)numwrd++;curl=0;}
		else if(inp.charAt(i)!='_'){curl++;}
		i++;
	}
	if(curl>0)numwrd++;
curl=0;
}

System.out.println(maxl+" "+numwrd);

}
}


import java.util.*;

public class Test {

	public static void main(String[] args) {
		ArrayList<String> arr1 = new ArrayList<>();
		ArrayList<String> arr2 = new ArrayList<>();
		Scanner in = new Scanner(System.in);
		int n, flag = 0;
		n = in.nextInt();
		String s = "", str = in.next();
		str += "^";
		n++;
		char[] input = new char[256];
		for (int i = 0; i < n; i++) {
			input[i] = str.charAt(i);
		}
		for (int i = 0; i < n; i++) {
			if (input[i] == '(') {
				flag = 1;
				input[i] = '^';
				continue;
			} else if (input[i] == ')') {
				flag = 0;
				arr2.add(s);
				input[i] = '^';
				s = "";
			}
			if (flag == 1) {
				s += input[i];
				input[i] = '^';
			}
		}
		s = "";
		for (int i = 0; i < n; i++) {
			if (input[i] == '^') {
				if (s.isEmpty() == true)
					continue;
				arr1.add(s);
				s = "";
			} else
				s += input[i];
		}
		int max = 0;
		int count = 0;
		for (int i = 0; i < arr1.size(); i++) {
			String temp = arr1.get(i);
			temp += "_";
			for (int j = 0; j < temp.length(); j++) {
				if (Character.isLetter(temp.charAt(j)) == true) {
					count++;
				} else if (temp.charAt(j) == '_') {
					max = Math.max(max, count);
					count = 0;
				}
			}
		}
		count = 0;
		for (int i = 0; i < arr2.size(); i++) {
			String temp = arr2.get(i);
			temp += "_";
			String m = "";
			for (int j = 0; j < temp.length(); j++) {
				if (Character.isLetter(temp.charAt(j)) == true) {
					m += temp.charAt(j);
				} else if (temp.charAt(j) == '_' && m.isEmpty() == false) {
					m = "";
					count++;
				}
			}
		}
		System.out.println(max + " " + count);
	}
}


import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.ArrayList;
import java.util.InputMismatchException;

public class Second {

    public static void main(String[] args) throws Exception
    {
    	int n=i();
    	String st=s();
        char[] c=st.toCharArray();
        int a1=0,a2=0;
        StringBuilder sb=new StringBuilder();
        StringBuilder sb2=new StringBuilder();
        for( int i=0 ; i<n ; i++ ){

        	if( c[i]=='(' ){
        		sb.append("_");
        		i++;
        		while( i<n && c[i]!=')' ){
        			sb2.append(c[i]);
        			i++;
        		}
        		sb2.append("_");
        	}
        	else if( i<n ){
        		sb.append(c[i]);
        	}
        }
        String[] s=sb.toString().split("_");
        for( int i=0 ; i<s.length ; i++ ){
        	a1=Math.max(a1, s[i].length());
        }
        s=sb2.toString().split("_");
        for( int i=0 ; i<s.length ; i++ ){
        	if( s[i].length()>0 ) a2++;
        }
        out.println(a1+" "+a2);
        out.close();

    }

    static InputReader in = new InputReader(System.in);
    static OutputWriter out = new OutputWriter(System.out);

    static int i()
    {
    	return in.readInt();
    }

    static long l()
    {
    	return in.readLong();
    }

    static double d()
    {
    	return in.readDouble();
    }

    static String s()
    {
    	return in.readString();
    }

    static void Iarr( int[] array, int no )
    {
    	for( int i=0 ; i<no ; i++ )
    	{
    		array[i] = i();
    	}
    }

    static void Larr( long[] array, int no )
    {
    	for( int i=0 ; i<no ; i++ )
    	{
    		array[i] = l();
    	}
    }

    static void Darr( double[] array, int no )
    {
    	for( int i=0 ; i<no ; i++ )
    	{
    		array[i] = d();
    	}
    }

    static void Sarr( String[] array, int no )
    {
    	for( int i=0 ; i<no ; i++ )
    	{
    		array[i] = s();
    	}
    }

    private static class InputReader
    {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream)
        {
            this.stream = stream;
        }

        public int read()
        {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars)
            {
                curChar = 0;
                try
                {
                    numChars = stream.read(buf);
                } catch (IOException e)
                {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int readInt()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-')
            {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do
            {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String readString()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do
            {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }
        public double readDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, readInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, readInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }
        public long readLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public boolean isSpaceChar(int c)
        {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next()
        {
            return readString();
        }

        public interface SpaceCharFilter
        {
            public boolean isSpaceChar(int ch);
        }
    }

    private static class OutputWriter
    {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream)
        {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer)
        {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects)
        {
            for (int i = 0; i < objects.length; i++)
            {
                if (i != 0)
                    writer.print(' ');
                writer.print(objects[i]);
            }
        }

        public void println(Object... objects)
        {
            print(objects);
            writer.println();
        }

        public void close()
        {
            writer.close();
        }

        public void flush()
        {
            writer.flush();
        }
     }
}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

public class Main {

    public static void main(String[] args) throws IOException {
        Reader.init(System.in);
        int n = Reader.nextInt() ;
        String s = Reader.next().replaceAll("_+"," ") ;
        StringBuilder fuck = new StringBuilder() ;
        for (int i=0 ; i<s.length() ; i++) {
            if (s.charAt(i)=='(') {
                fuck.append(" ( ");
            }else if (s.charAt(i)==')') {
                fuck.append(" ) ");
            } else {
                fuck.append(s.charAt(i));
            }
        }
        s = fuck+"" ;
        String [] a = s.split(" +");
        boolean is = false ;
        int max = 0 , c = 0;
        for (int i=0 ; i<a.length ; i++) {
            if (a[i].contains("(")) {
                is = true;
            } else if (a[i].contains(")")) {
                is = false ;
            } else if (a[i].contains(")")==false && a[i].contains("(")==false){
                if (is){
                    c ++ ;
                } else {
                    max = Math.max(a[i].length(),max);
                }

            }
        }
        System.out.println(max + " "+ c);

    }

}
class Pair {
    int x ;
    int y ;

    Pair (int x , int y) {
        this.x = x ;
        this.y = y ;
    }
}
class Reader {

        static BufferedReader reader;
        static StringTokenizer tokenizer;

        public static int pars(String x) {
            int num = 0;
            int i = 0;
            if (x.charAt(0) == '-') {
                i = 1;
            }
            for (; i < x.length(); i++) {
                num = num * 10 + (x.charAt(i) - '0');
            }

            if (x.charAt(0) == '-') {
                return -num;
            }

            return num;
        }

        static void init(InputStream input) {
            reader = new BufferedReader(
                    new InputStreamReader(input));
            tokenizer = new StringTokenizer("");
        }

        static void init(FileReader input) {
            reader = new BufferedReader(input);
            tokenizer = new StringTokenizer("");
        }

        static String next() throws IOException {
            while (!tokenizer.hasMoreTokens()) {
                tokenizer = new StringTokenizer(
                        reader.readLine());
            }
            return tokenizer.nextToken();
        }

        static int nextInt() throws IOException {
            return pars(next());
        }

        static long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        static double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }
    }


import java.util.Scanner;
public class p723b{
	public static void main(String []args){
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		String s = in.next();
		int lw,wi,w,j;
		boolean _in=false;
		lw=wi=w=0;
		j=-1;
		for(int i=0;i<s.length();i++){
			char c=s.charAt(i);
			if(c=='_' && !_in && lw<i-j-1){
				lw = i-j-1;
			}
			if(c=='_' && _in && i-j>1){
				wi++;
			}
			if(c=='('){
				_in = true;
				if(lw<i-j-1)lw=i-j-1;
			}
			if(c==')'){
				_in = false;
				if(i-j>1)wi++;
			}
			if(c=='_' || c=='(' || c ==')')
				j=i;
		}
		if(lw<s.length()-j-1)lw=s.length()-j-1;
		System.out.println(lw+" "+wi);
	}
}


import java.util.Scanner;

/**
Thanks to Valeh :D
 */

public class TextDocumentAnalysis {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String s = sc.next();
        s.toLowerCase();
        int maxL = -1;
        int nwi = 0;
        int fp = 0;
        int fw = 0;
        for(int i=0;i<n;i++){
            char c = s.charAt(i);
            if(c == '(') {fp++;fw=0;}
            else if(c == ')') {
                if(fp == 1 && fw != 0) nwi++;
                fp--;fw=0;
            }
            else if(c == '_') {
                if(fp == 1 && fw != 0) nwi++;
                fw=0;
            }
            else {
                fw++;
            }
            if(fp==0) maxL = Math.max(fw, maxL);
        }
        System.out.println(maxL + " " + nwi);
    }
}

//_Hello_Vasya(and_Petya)__bye_(and_OK)


/*
 * CODRE: ATIKUR RAHMAN
 * DATE: 29/10/2016
 *
 * */

import java.util.Scanner;

public class P_B_Text_Document_Analysis {
	static int outMax, inMax, count = 0;

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		int stringLen = scanner.nextInt();

		String text = scanner.next();

		scanner.close();
		int i = 0;

		try {
			while (true) {

				if (text.charAt(i) == '(') {
					while (true) {
						int c=0;
							while (text.charAt(i) != '_' && text.charAt(i)!=')' && text.charAt(i)!='(') {
								if (c==0) {
									inMax++;
									c++;
								}
								i++;
							}

						if (text.charAt(i)==')') {
							count=0;
							break;

						}
						count=0;
						i++;
					}
				} else {
					while (true) {

							while (text.charAt(i) != '_' && text.charAt(i)!=')' && text.charAt(i)!='(') {
								count++;
								i++;
							}

						if (outMax < count) {
							outMax = count;
							count = 0;
						}

						if (text.charAt(i)=='(') {
							count=0;
							break;
						}
						count=0;
						i++;
					}
				}
			}
		} catch (Exception e) {

		}finally{
			if (outMax < count) {
				outMax = count;
			}
		}

		System.out.print(outMax + " " + inMax);

	}

}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author SeeZawL
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, FastReader in, PrintWriter out) {
            int n = in.nextInt();
            String str = in.nextLine() + "_";
            boolean in_par = false, in_word = false;
            int word_cnt = 0, word_len = 0, max_len = 0;

            for (int i = 0; i <= n; i++) {
                char c = str.charAt(i);
                if (in_word && (c == '_' || c == '(' || c == ')')) {
                    in_word = false;
                    if (in_par) {
                        word_cnt++;
                    } else if (word_len > max_len) {
                        max_len = word_len;
                    }
                    if (c == '(') {
                        in_par = true;
                    }
                    if (c == ')') {
                        in_par = false;
                    }
                    word_len = 0;
                } else if (!in_word && !(c == '_' || c == '(' || c == ')')) {
                    in_word = true;
                    word_len++;
                } else if (in_word) {
                    word_len++;
                } else if (c == '(') {
                    in_par = true;
                } else if (c == ')') {
                    in_par = false;
                }
            }
            out.printf("%d %d", max_len, word_cnt);
        }

    }

    static class FastReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public FastReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        String nextLine() {
            String str = "";
            try {
                str = reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            return str;
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}


import java.util.Scanner;
import java.lang.*;

public class cf723b {

	static final Scanner sc = new Scanner(System.in);
	static int[] documentAnalyser(String doc) {
		boolean insideParenthesis = false;
		boolean lastWasLetter = false;

		int longestLength = 0;
		int wordLength = 0;

		int wordsInParentheses = 0;

		for (int i = 0; i < doc.length(); ++i) {
			if (doc.charAt(i) == '(') {
				insideParenthesis = true;
				lastWasLetter = false;
				wordLength = 0;
			}
			else if (doc.charAt(i) == ')') {
				insideParenthesis = false;
				lastWasLetter = false;
				wordLength = 0;
			}
			else if (Character.isLetter(doc.charAt(i))) {
				if (insideParenthesis && !lastWasLetter) {
					wordsInParentheses += 1;
				}
				else if (!insideParenthesis) {
					wordLength += 1;
					longestLength = Math.max(wordLength, longestLength);
				}
				lastWasLetter = true;
			}
			else {
				lastWasLetter = false;
				wordLength = 0;
			}
		}
		int[] valuesOfInterest = {longestLength, wordsInParentheses};
		return valuesOfInterest;
	}
	public static void main(String[] args) {
		int stringLength = sc.nextInt();
		String doc = sc.next();
		int[] analysis = new int[2];
		analysis = documentAnalyser(doc);
		System.out.print(analysis[0] + " " + analysis[1]);
	}
}


import java.io.*;
import java.util.*;
public class TextEditing{
    public static int maxLength(String s){
        String t="";
        boolean f=false;
        char ch;
        for(int i=0;i<s.length();i++){
            ch=s.charAt(i);
            if(ch=='(')
                f=true;
            else if(ch==')')
            {f=false;t+="_";}
            if(!f && ch!=')')
                t+=ch;
        }
        //System.out.println("t is "+t);
        String arr[]=t.split("_");
        int max=0;
        for(int i=0;i<arr.length;i++)
            max=Math.max(max,arr[i].length());
        return max;
    }
    public static int count(String s){
        String arr[]=s.split("_");
        int m=0;
        for(int i=0;i<arr.length;i++){
            if(arr[i].length()!=0)
                m++;
        }
        return m;
    }
    public static int words(String s){
        int c=0;
        String t="";
        boolean f=false;
        for(int i=0;i<s.length();i++){
            char ch=s.charAt(i);
            if(ch=='(')
                f=true;
            else if(ch==')'){
                f=false;
                c+=count(t);
                t="";
            }
            if(f && ch!='(')
                t+=ch;
        }
        return c;
    }
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        String s=sc.next();
        System.out.println(maxLength(s)+" "+words(s));
    }
}


import java.io.*;
import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		String s=sc.next();
		int flag1=0;
		int flag2=0;
		int flag3=0;
		int max=-1;
		int cur=0;
		int cur2=0;
		int number=0;
		boolean start=false;
		for(int i=0;i<n;i++){

			if(flag2==0){
				if(isAlpha(s.charAt(i))){
					cur++;
					//System.out.println(cur);
				}
				if(cur>0&&s.charAt(i)=='_'){
					max=Math.max(max, cur);
					cur=0;
				}
				if(cur>0&&s.charAt(i)=='('){
					max=Math.max(max, cur);
					cur=0;
				}

				}
		    if(flag2==1){
		    	if(isAlpha(s.charAt(i))){
		    		cur2++;
		    	}
		    	if(s.charAt(i)=='_'||s.charAt(i)==')'){
		    		if(cur2>0){
		    			number++;
		    			cur2=0;
		    		}
		    	if(s.charAt(i)==')'){
		    		flag2=0;
		    	}
		    	}
		    }
		    if(s.charAt(i)=='('){
				flag2=1;
			}

		}
		if(cur>0){
			max=Math.max(max, cur);
			cur=0;
		}
		if(max==-1){
			System.out.print(0+" ");
		}
		else
		System.out.print(max+" ");
		System.out.println(number);
	}
static boolean isAlpha(char a){
	if((a>='A'&&a<='Z')||(a>='a'&&a<='z')){
		return true;
	}
	else
		return false;
}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Scanner;

public class easy {

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		boolean skb=false;
		String temp="";
		int max=0;
		ArrayList<String> arr=new ArrayList<>();
		Scanner in=new Scanner(System.in);
		int how=in.nextInt();
		char c;
		in.nextLine();
		String s=in.nextLine();
		char[] WTF=s.toCharArray();
		int i=0;
		while(i<WTF.length){
			c=WTF[i++];
			if(c=='('){
				skb=true;
				if(temp.length()>max){
					max=temp.length();
				}
				temp="";
			}
			if(c==')'){
				skb=false;
				if(temp.length()>0){
					arr.add(temp);
					temp="";
				}
			}
			if(Character.isLetter(c)==true) temp+=c;
			if(c=='_' && skb==false){
				if(temp.length()>max){
					max=temp.length();
				}
				temp="";
			}
			if(c=='_' && skb==true){
				if(temp.length()>0){
					arr.add(temp);
					temp="";
				}
			}
			//System.out.print(c);
		}
	//	System.out.println(arr);
		if(temp.length()>max){
			max=temp.length();
		}
		temp="";
		System.out.println(max+" "+arr.size());
	}
}


import java.io.*;
import java.util.*;

public class textdocumentanalysis {
	static int count_inside_braces = 0, longest_word = 0;

	public static int remove_underscore(String str) {
		str = str.replaceAll("_", " ");
		str = str.trim().replaceAll(" +", " ");
		String s[] = str.split(" ");
		if (s.length == 1 && s[0].equals(""))
			return 0;
		return s.length;
	}

	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String s = sc.next();
		ArrayList<Integer> braces_indices = new ArrayList<Integer>();
		braces_indices.add(-1);
		for (int i = 0; i < s.length(); i++) {
			if (s.charAt(i) == '(' || s.charAt(i) == ')')
				braces_indices.add(i);
		}
		int i = 1, count = 0, maxl = 0;
		String outside_braces = "";
		while (i < braces_indices.size() - 1) {
			int open_brace_index = braces_indices.get(i);
			int close_brace_index = braces_indices.get(i + 1);
			String inside_braces = s.substring(braces_indices.get(i) + 1, braces_indices.get(i + 1));
			count = remove_underscore(inside_braces);
			count_inside_braces += count;
			outside_braces += "_" + s.substring(braces_indices.get(i - 1) + 1, braces_indices.get(i));
			i += 2;
		}
		outside_braces += "_" + s.substring(braces_indices.get(braces_indices.size() - 1) + 1);
		outside_braces = outside_braces.replaceAll("_", " ");
		outside_braces = outside_braces.trim().replaceAll(" +", " ");
		String s_new[] = outside_braces.split(" ");
		for (int j = 0; j < s_new.length; j++) {
			if (s_new[j].length() > maxl)
				maxl = s_new[j].length();
		}

		System.out.print(maxl + " " + count_inside_braces);
	}
}


import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author sheep
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskE solver = new TaskE();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskE {

    final int MOD = 1000000007;

    private int addMod(int x, int y) {
        int ret = x + y;
        if (ret < 0) ret += MOD;
        if (ret >= MOD) ret -= MOD;

        return ret;
    }

    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int choose[][] = new int[200][200];
        for (int i = 0; i < choose.length; ++i) {
            choose[i][0] = choose[i][i] = 1;
            for (int j = 1; j < i; ++j) {
                choose[i][j] = choose[i - 1][j] + choose[i - 1][j - 1];
            }
        }

        int n = in.nextInt();
        int m = in.nextInt();
        int upper = in.nextInt();

        int dp[][][][] = new int[2][n + 1][upper + 1][upper + 1];
        for (int i = 1; i + i <= n; ++i) {
            dp[0][2 * i][1][i] = 1;
        }

        int ans = 0;

        for (int i = 0; i < m - 1; ++i) {
            int now = i & 1, next = now ^ 1;

            for (int j = 0; j <= n; ++j) {
                for (int k = 1; k <= upper; ++k) {
                    for (int r = 1; r <= upper; ++r) {
                        dp[next][j][k][r] = 0;
                    }
                }
            }

            for (int j = 1; j * 2 <= n; ++j) {
                dp[next][2 * j][1][j] = 1;
            }

            for (int j = 0; j <= n; ++j) {
                for (int k = 1; k <= upper; ++k) {
                    for (int r = 1; r <= upper; ++r) {
                        if (0 == dp[now][j][k][r]) continue;
                        if (j > 1) {
                            ans = addMod(ans, dp[now][j][k][r]);
                        }
                        for (int delta = 1; j + 2 * delta <= n && delta <= upper; ++delta) {
                            int nextPlan = k * choose[delta + r - 1][r - 1];
                            if (nextPlan > upper) break;
                            dp[next][j + 2 * delta][nextPlan][delta] = addMod(dp[next][j + 2 * delta][nextPlan][delta], dp[now][j][k][r]);
                        }
                    }
                }
            }
        }

        out.println(ans);
    }
}

class InputReader {
    BufferedReader reader;
    StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (Exception e) {
                throw new UnknownError();
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    }


import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.*;
import java.io.InputStream;

public class Solution {
    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        Task solver = new Task();
        solver.solve(in, out);

        out.close();
    }
}

/*
 *     Solution
 */

class Task {

    private final static int N = 20;

    public void solve(InputReader in, PrintWriter out) {

        int n = in.nextInt();
        String[] s = new String[n];
        for (int i = 0; i < n; i++) {
            s[i] = new String(in.next());
        }

        int m = s[0].length();
        long[] d = new long[(1 << N)];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                if(i == j) continue;

                int mask = 0;
                for (int pos = 0; pos < m; pos++) {
                    if(s[i].charAt(pos) == s[j].charAt(pos)) {
                        mask |= (1 << pos);
                    }
                }
                d[mask] |=  (1L << i);
            }
        }

        for(int i = 0; i < m; i++){
            for(int pos = 0; pos < (1 << m) ; pos++){
                d[pos] |= d[pos|(1 << i)];
            }
        }

        int[] sum = new int[(1 << m)];
        for(int k = 0;k < (1 << m); k++){
            sum[k] = Long.bitCount(d[k]);
        }

        double[] f = new double[60];
        f[0] = 1;
        for(int i = 1;i < 60;i++)
            f[i] = f[i-1] * i;

        double[] ps = new double[m];
        for(int k = 0;k < m;k++){
            ps[k] = f[k] * f[m-1-k] / f[m];
        }

        double ans = 0;
        for(int i = 0; i < (1 << m); i++) {
            int k = Integer.bitCount(i);
            for(int j = 0; j < m; j++){
                if( i << ~j < 0){
                    ans += k * ps[k-1] * (sum[i^1<<j] - sum[i]);
                }
            }
        }

        out.printf(Locale.US, "%.12f\n", ans/n);

        return;
    }

}

/*
 *      Reading
 */

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader (InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }
    public long nextLong() {
        return Long.parseLong(next());
    }
    public double nextDouble() {
        return Double.parseDouble(next());
    }

}


import java.util.Scanner;

public class CF105D {

	public static double [][] probArray;
	public static int bagSize;

	public static void main(String args[]) {
		Scanner scan = new Scanner(System.in);
		int w = scan.nextInt();
		int b = scan.nextInt();
		bagSize = w + b;
		probArray = new double[w+1][b+1];
		for(int i = 0; i <= w; i++) {
			for(int j = 0; j <= b; j++) {
				probArray[i][j] = -1;
			}
		}
		System.out.println(recursiveProb(w, b));
	}

	private static double recursiveProb(int w, int b) {
		if(w == 0 && b == 0) {
			// No mice left, princess cannot win.
			return 0;
		} else if(w == -1 || b == -1) {
			// Ran out of one kind of mouse, princess loses.
			return 0;
		} else if(probArray[w][b] != -1) {
			// Already filled this value.
			return probArray[w][b];
		} else {
			double nextW = (double)w / (w + b);
			double nextB = (double)b / (w + b);
			double probP; // Princess

			if((bagSize - (w + b)) % 3 == 0) {
				// Princess' turn.
				probP = nextW + nextB * recursiveProb(w, b - 1);
			} else if((bagSize - (w + b)) % 3 == 1) {
				// Dragon's turn.
				probP = nextB * recursiveProb(w, b - 1);
			} else {
				// Escaped mouse.
				probP = nextW * recursiveProb(w - 1, b) + nextB * recursiveProb(w, b - 1);
			}

			probArray[w][b] = probP;
			return probArray[w][b];
		}
	}
}


// upsolve with rainboy
import java.io.*;

public class CF1152D {
	static final int MD = 1000000007;
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		int[] dp = new int[1 + n + 1];
		dp[0] = 1;
		int ans = 0;
		for (int i = 0; i <= n; i++)
			for (int j = i; j <= n; j++) {
				if ((i + j) % 2 == 1)
					ans = (ans + dp[j]) % MD;
				dp[j + 1] = (dp[j + 1] + dp[j]) % MD;
			}
		System.out.println(ans);
	}
}


import java.io.* ;

import java.util.*;

public class ghh {

	static int n ;
	static long occ[] ;
	static long nbr_vertexes[] ;
	static long big = (long) (1e9 + 7) ;
	static void count_vertexes()
	{
		occ[0]++ ;
		nbr_vertexes[0]=1 ;
		for(int i=1 ;i<=n ;i++)
		{
			long oc[] = new long[n/2 +1] ;
			int limite = Integer.min(n-i, n/2);
			for(int j=0 ;j<=limite; j++)
			{
				long h = occ[j] ;
				if(j+1<=limite)
					{
					oc[j+1]+=(h) ;oc[j+1]%=big  ;
					}
				if(j-1>=0)
					{
					oc[j-1]+=h ; oc[j-1]%=big  ;
					}
				oc[j]%=big  ;
			}
			if(limite+1<=n/2)
				{
				oc[limite]+=occ[limite+1] ;
				oc[limite]%=big ;
				}
			long sum=0 ;
			for(int j=0 ;j<=limite; j++)
			{
				sum+= (oc[j]) ;
				occ[j]=oc[j] ;
				sum = sum%big ;
			}
			nbr_vertexes[i]=sum ;
		}

	}

	public static void main(String[] args) throws IOException {

		BufferedReader jk = new BufferedReader(new InputStreamReader(System.in)) ;
		PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out)) ;
		StringTokenizer ana =new StringTokenizer(jk.readLine()) ;
		n = Integer.parseInt(ana.nextToken()) ;
		n= 2*n ;
		occ = new long[n/2+1] ;
		nbr_vertexes = new long[n+1] ;
		long res1 = 0 ;
		long res2 = 0 ;
		count_vertexes();
		for(int i= n-1 ;i>=0 ; i-=2)
		{

			res1+=nbr_vertexes[i] ;
			res1%=big ;
		}
		for(int i= n-2 ;i>=0 ; i-=2)
		{
			res2+=nbr_vertexes[i] ;
			res2%=big ;
		}
		out.println(res1);

		out.flush();
	}

}


import java.util.*;
import java.io.*;
import static java.lang.Math.*;
public class Main {
    static final long MOD = 1_000_000_007 , INF = 1_000_000_000_000_000L;
    static final int INf = 1_000_000_000;
    static FastReader reader;
    static PrintWriter writer;
    public static void main(String[] args) {
        Thread t = new Thread(null, new O(), "Integer.MAX_VALUE", 100000000);
        t.start();
    }
    static class O implements Runnable {
        public void run() {
            try {
                magic();
            }
            catch (Exception e) {
                e.printStackTrace();
                System.exit(1);
            }
        }
    }
    static class FastReader {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public FastReader() {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public FastReader(String file_name) throws IOException {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException {
            byte[] buf = new byte[1000000];
            int cnt = 0, c;
            while ((c = read()) != -1) {
                if (c == '\n') break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException {
            int ret = 0;
            byte c = read();
            while (c <= ' ') c = read();
            boolean neg = (c == '-');
            if (neg) c = read();
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');
            if (neg) return -ret;
            return ret;
        }

        public long nextLong() throws IOException {
            long ret = 0;
            byte c = read();
            while (c <= ' ') c = read();
            boolean neg = (c == '-');
            if (neg) c = read();
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');
            if (neg) return -ret;
            return ret;
        }

        public double nextDouble() throws IOException {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ') c = read();
            boolean neg = (c == '-');
            if (neg) c = read();
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');
            if (c == '.') while ((c = read()) >= '0' && c <= '9') ret += (c - '0') / (div *= 10);
            if (neg) return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1) buffer[0] = -1;
        }

        private byte read() throws IOException {
            if (bufferPointer == bytesRead) fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException {
            if (din == null) return;
            din.close();
        }
    }
    static int n, dp0[][], dp1[][];
    static void magic() throws IOException {
        reader = new FastReader();
        writer = new PrintWriter(System.out, true);
        n = reader.nextInt();
        dp0 = new int[2*n+1][2*n+1];
        dp1 = new int[2*n+1][2*n+1];
        for(int i=0;i<=n+n;++i) {
            for(int j=0;j<=n+n;++j) {
                dp0[i][j] = dp1[i][j] = -1;
            }
        }
        //fd(0, 0);
        writer.println(max(f(0,0,1), f(0,0,0)));
    }
    static int f(int idx, int open_count, int to_be_inc) {
        //writer.println("idx: "+idx+" open_count: "+open_count+" to_be_inc: "+to_be_inc);
        if(idx==2*n) {
            return 0;
        }
        if(to_be_inc==0) {
            if(dp0[idx][open_count]!=-1) {
                return dp0[idx][open_count];
            }
            //placing open
            int max = 0;
            int left_iske_baad = 2*n - idx - 1;
            if(left_iske_baad>open_count) {
                max+=max(f(idx+1, open_count+1, 0), f(idx+1, open_count+1, 1));
            }
            //placing close
            if(open_count>0) {
                max+=max(f(idx+1, open_count-1, 0), f(idx+1, open_count-1, 1));
            }
            return dp0[idx][open_count] = (int)(max%MOD);
        }
        else {
            if(dp1[idx][open_count]!=-1) {
                return dp1[idx][open_count];
            }
            //placing open
            int max = 0;
            int left_iske_baad = 2*n - idx - 1;
            if(left_iske_baad>open_count) {
                max = 1+f(idx+1, open_count+1, 0);
                if(open_count>0) {
                    max+=max(f(idx+1, open_count-1, 0), f(idx+1, open_count-1, 1));
                }
            }
            //placing close
            if(open_count>0) {
                int ispe = 1+f(idx+1, open_count-1, 0);
                if(left_iske_baad>open_count) {
                    ispe+=max(f(idx+1, open_count+1, 0), f(idx+1, open_count+1, 1));
                }
                max = max(max, ispe);
            }
            return dp1[idx][open_count] = (int)(max%MOD);
        }
    }
    static void fd(int idx, int open_count) {
        //writer.println("idx: "+idx+" open_count: "+open_count+" to_be_inc: "+to_be_inc);
        if(idx==2*n) {
            writer.println("Open count: " + open_count);
            if(open_count==0) {
            }
        }

        //placing open
        int max = 0;
        int left_iske_baad = 2*n - idx - 1;
        if(left_iske_baad>open_count) {
            fd(idx+1, open_count+1);
        }
        //placing close
        if(open_count>0) {
            fd(idx+1, open_count-1);
        }
    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in Actual solution is at the top
 *
 * @author @Ziklon
 */
public class Main {
  public static void main(String[] args) {
    InputStream inputStream = System.in;
    OutputStream outputStream = System.out;
    InputReader in = new InputReader(inputStream);
    OutputWriter out = new OutputWriter(outputStream);
    DNekoAndAkisPrank solver = new DNekoAndAkisPrank();
    solver.solve(1, in, out);
    out.close();
  }

  static class DNekoAndAkisPrank {
    int[][][] dp;
    static int MOD = (int) (1e9 + 7);

    int func(int idx, int inc, int last) {
      if (inc < 0 || last * 2 > dp.length) return 0;

      if (idx >= dp.length) {
        return 0;
      }

      if (dp[idx][inc][last] != -1) return dp[idx][inc][last];

      int ans = 0;
      int remain = dp.length - idx;

      if (last == 0) {
        if (inc + 1 <= remain && inc > 0) {
          ans = Math.max(ans, 1 + func(idx + 1, inc + 1, 1) + func(idx + 1, inc - 1, 0)) % MOD;
          ans = Math.max(ans, 1 + func(idx + 1, inc - 1, 1) + func(idx + 1, inc + 1, 0)) % MOD;
        } else if (inc > 0) ans = Math.max(ans, 1 + func(idx + 1, inc - 1, 1));
        else {
          ans = Math.max(ans, 1 + func(idx + 1, inc + 1, 1)) % MOD;
        }

      } else {
        if (inc > 0) ans += func(idx + 1, inc - 1, 0) % MOD;
        if (inc + 1 <= remain) ans += func(idx + 1, inc + 1, 0) % MOD;
      }
      dp[idx][inc][last] = ans % MOD;
      return ans;
    }

    public void solve(int testNumber, InputReader in, OutputWriter out) {
      int n = in.readInt();
      dp = new int[n * 2][n + 1][3];

      for (int i = 0; i < dp.length; ++i) ArrayUtils.fill(dp[i], -1);

      out.printLine(Math.max(func(0, 0, 0), func(0, 0, 1)));
    }
  }

  static class InputReader {
    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    private InputReader.SpaceCharFilter filter;

    public InputReader(InputStream stream) {
      this.stream = stream;
    }

    public int read() {
      if (numChars == -1) {
        throw new InputMismatchException();
      }
      if (curChar >= numChars) {
        curChar = 0;
        try {
          numChars = stream.read(buf);
        } catch (IOException e) {
          throw new InputMismatchException();
        }
        if (numChars <= 0) {
          return -1;
        }
      }
      return buf[curChar++];
    }

    public int readInt() {
      int c = read();
      while (isSpaceChar(c)) {
        c = read();
      }
      int sgn = 1;
      if (c == '-') {
        sgn = -1;
        c = read();
      }
      int res = 0;
      do {
        if (c < '0' || c > '9') {
          throw new InputMismatchException();
        }
        res *= 10;
        res += c - '0';
        c = read();
      } while (!isSpaceChar(c));
      return res * sgn;
    }

    public boolean isSpaceChar(int c) {
      if (filter != null) {
        return filter.isSpaceChar(c);
      }
      return isWhitespace(c);
    }

    public static boolean isWhitespace(int c) {
      return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    public interface SpaceCharFilter {
      public boolean isSpaceChar(int ch);
    }
  }

  static class ArrayUtils {
    public static void fill(int[][] array, int value) {
      for (int[] row : array) {
        Arrays.fill(row, value);
      }
    }
  }

  static class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
      writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public OutputWriter(Writer writer) {
      this.writer = new PrintWriter(writer);
    }

    public void close() {
      writer.close();
    }

    public void printLine(int i) {
      writer.println(i);
    }
  }
}


import java.util.Scanner;

public class Main {
    private static Scanner sc = new Scanner(System.in);
    private static int mod = 1000000007;
    public static void main(String[] args) {
        int [][]dp = new int[2005][2005];
        int [][]ok = new int[2005][2005];
        ok[0][0] = 1;
        for(int i = 1; i <= 2000; i++){
            for(int j = i & 1; j <= i; j += 2){
                if(j == 0) {
                    dp[i][j] = dp[i - 1][j + 1];
                    if(ok[i - 1][j + 1] == 1)
                        dp[i][j] = (dp[i][j] + 1) % mod;
                    else
                        ok[i][j] = 1;
                    continue;
                }
                dp[i][j] = (dp[i - 1][j - 1] + dp[i - 1][j + 1]) % mod;
                if(ok[i - 1][j + 1] == 1 || ok[i - 1][j - 1] == 1)
                    dp[i][j] = (dp[i][j] + 1) % mod;
                else
                    ok[i][j] = 1;

            }
        }
        System.out.print(dp[2 * sc.nextInt()][0]);
    }

}


import java.util.Scanner;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Andy Phan (Edited for speedups by AuroraGarden)
 */
public class p1152d {
    static boolean[][] hasVal;
    static boolean[][] doneVal;
    static long[][][] dp;
    static boolean[][][] done;

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        hasVal = new boolean[2*n+1][2*n+1];
        doneVal = new boolean[2*n+1][2*n+1];
        dp = new long[2*n+1][2*n+1][2];
        done = new boolean[2*n+1][2*n+1][2];
        System.out.println(traverse(2*n, 0, 0)%1_000_000_007);
    }

    public static long traverse(int ind, int diff, int flag) {
        if(ind <= 0 || diff < 0) return 0;
        if(done[ind][diff][flag]) return dp[ind][diff][flag];
        done[ind][diff][flag] = true;
        long num = 0;
        if(flag == 1) {
            if(hasVal(ind-1, diff-1)) num += traverse(ind-1, diff-1, 0);
            if(hasVal(ind-1, diff+1)) num += traverse(ind-1, diff+1, 0);
            if(num >= 1_000_000_007) num -= 1_000_000_007;
            return dp[ind][diff][flag] = num;
        }
        if(hasVal(ind-1, diff-1)) {
            long tmp = traverse(ind-1, diff-1, 1)+1;
            if(hasVal(ind-1, diff+1)) tmp += traverse(ind-1, diff+1, 0);
            num = max(num, tmp);
        }
        if(hasVal(ind-1, diff+1)) {
            long tmp = traverse(ind-1, diff+1, 1)+1;
            if(hasVal(ind-1, diff-1)) tmp += traverse(ind-1, diff-1, 0);
            num = max(num, tmp);
        }
        if(num >= 1_000_000_007) num -= 1_000_000_007;
        return dp[ind][diff][flag] = num%1_000_000_007;
    }
    static long max(long a, long b) {return a > b ? a : b;}

    public static boolean hasVal(int ind, int diff) {
        if(diff < 0) return false;
        return diff <= ind;
    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author prakharjain
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        DNekoAndAkisPrank solver = new DNekoAndAkisPrank();
        solver.solve(1, in, out);
        out.close();
    }

    static class DNekoAndAkisPrank {
        int mod = 1000000007;

        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.nextInt();

            long[][] dp = new long[2 * n + 1][2 * n + 1];

            dp[1][1] = 1;

            for (int i = 2; i <= 2 * n; i++) {
                for (int j = 0; j <= i; j++) {
                    if (j > 0) {
                        dp[i][j] += dp[i - 1][j - 1];
                        dp[i][j] %= mod;
                    }

                    if (j < 2 * n) {
                        dp[i][j] += dp[i - 1][j + 1];
                        dp[i][j] %= mod;
                    }
                }
            }

            long ans = 0;
            for (int i = 2 * n - 1; i >= 0; i -= 2) {
                for (int j = 0; j <= i; j++) {
                    if (2 * n - i >= j) {
                        ans += dp[i][j];
                        ans %= mod;
                    }
                }
            }

            out.println(ans);
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void println(long i) {
            writer.println(i);
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}


import java.util.Arrays;
import java.util.Scanner;

public class D {
    private static int solve(int len, int open, boolean avail, int n, int[][][] memo) {
        int mod = 1000000007;

        if (len == 2 * n) {
            return 0;
        }

        int availInt = avail ? 0 : 1;

        if (memo[availInt][len][open] != -1) {
            return memo[availInt][len][open];
        }

        int closed = len - open;
        boolean canOpen = open < n;
        boolean canClose = closed < open;

        int ans = 0;
        if (avail) {
            if (canOpen && canClose) {
                ans += solve(len + 1, open + 1, true, n, memo);
                ans += solve(len + 1, open, false, n, memo);
            } else if (canOpen) {
                ans += solve(len + 1, open + 1, false, n, memo);
            } else if (canClose) {
                ans += solve(len + 1, open, false, n, memo);
            }

            ans++;
        } else {
            if (canOpen) {
                ans += solve(len + 1, open + 1, true, n, memo);
            }

            if (canClose) {
                ans += solve(len + 1, open, true, n, memo);
            }
        }

        memo[availInt][len][open] = ans % mod;

        return ans % mod;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        int[][][] memo = new int[2][2 * n + 1][n + 1];

        for (int i = 0; i < 2 * n + 1; i++) {
            Arrays.fill(memo[0][i], -1);
            Arrays.fill(memo[1][i], -1);
        }

        System.out.println(solve(0, 0, true, n, memo));
    }
}


import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.StringTokenizer;
public class realfast implements Runnable {
    private static final int INF = (int) 1e9;

    public  void solve() throws IOException
    {
     int n = readInt();
     long dp[][][]= new long[n+1][n+1][2];
     for(int i=0;i<=n;i++)
        for(int j=0;j<=n;j++)
            for(int k=0;k<2;k++)
                dp[i][j][k]=-1;
     long val = dfs(dp,n,0,0);
     out.println(val);

    }

    public static long dfs(long dp[][][], int n, int cur, int a)
    {
        if(n==0&&cur==0)
            return 0;

        if(dp[n][cur][a]!=-1)
            return dp[n][cur][a];

            long val1=0;
            long val2=0;
            long val3 =0;
            long val4=0;
            if(n>0)
            {
              val1 = (1+dfs(dp,n-1,cur+1,1))%1000000007;
              val2 = (dfs(dp,n-1,cur+1,0))%1000000007;
            }

             if(cur>0)
             {
              val3= (1+dfs(dp,n,cur-1,1))%1000000007;
              val4= (dfs(dp,n,cur-1,0))%1000000007;
            }

        if(a==0)
        {

            dp[n][cur][a]=Math.max((val1+val4)%1000000007,(val2+val3)%1000000007);
            dp[n][cur][a]=Math.max(dp[n][cur][a],(val2+val4)%1000000007);
            return dp[n][cur][a];
        }
        else
        {
            dp[n][cur][1]=(val2+val4)%1000000007;
            return dp[n][cur][a];
        }

    }

    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    public static void main(String[] args) {
        new Thread(null, new realfast(), "", 128 * (1L << 20)).start();
    }

    private static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
    private BufferedReader reader;
    private StringTokenizer tokenizer;
    private PrintWriter out;

    @Override
    public void run() {
        try {
            if (ONLINE_JUDGE || !new File("input.txt").exists()) {
                reader = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(System.out);
            } else {
                reader = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            }
            solve();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            try {
                reader.close();
            } catch (IOException e) {
                // nothing
            }
            out.close();
        }
    }

    private String readString() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }

    @SuppressWarnings("unused")
    private int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    @SuppressWarnings("unused")
    private long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    @SuppressWarnings("unused")
    private double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }
}
class edge implements Comparable<edge>{
    int u ;
    int v ;
    int val;
    edge(int u1, int v1 , int val1)
    {
       this.u=u1;
       this.v=v1;
       this.val=val1;
    }
    public int compareTo(edge e)
    {
        return this.val-e.val;
    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author out_of_the_box
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        DNekoAndAkisPrank solver = new DNekoAndAkisPrank();
        solver.solve(1, in, out);
        out.close();
    }

    static class DNekoAndAkisPrank {
        private static final int MOD = 1000000007;

        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.nextInt();
            out.print(solve(n));
        }

        private int solve(int n) {
            int N = 2 * n;
            int[][][] dp = new int[N + 1][N + 1][2];
            dp[0][0][0] = 0;
            dp[0][0][1] = 0;
            for (int i = 1; i <= N; i++) {
                for (int j = 0; j <= i; j++) {
                    for (int k = 0; k <= 1; k++) {
                        dp[i][j][k] = 0;
                        if (k == 1) {
                            if (i - j >= 2) {
                                dp[i][j][k] = MathUtility.add(dp[i][j][k], dp[i - 1][j + 1][0], MOD);
                            }
                            if (j > 0) {
                                dp[i][j][k] = MathUtility.add(dp[i][j][k], dp[i - 1][j - 1][0], MOD);
                            }
                        } else {
                            dp[i][j][k] = Math.max(getVal(dp, i, j, false, false),
                                    Math.max(getVal(dp, i, j, false, true),
                                            getVal(dp, i, j, true, false)));
                        }
                    }
                }
            }
//        for (int i = 0; i<=N; i++) {
//            for (int j = 0; j<= N; j++) {
//                System.out.print("(");
//                System.out.print(dp[i][j][0]);
//                System.out.print(",");
//                System.out.print(dp[i][j][1]);
//                System.out.print(") ");
//            }
//            System.out.println();
//        }
//        System.out.println();
            return dp[N][0][0];
        }

        private int getVal(int[][][] dp, int i, int j, boolean selectStart, boolean selectEnd) {
            int ret = 0;
            if (i - j >= 2) {
                if (selectStart) {
                    ret = MathUtility.add(ret, dp[i - 1][j + 1][1], MOD);
                    ret = MathUtility.add(ret, 1, MOD);
                } else {
                    ret = MathUtility.add(ret, dp[i - 1][j + 1][0], MOD);
                }
            }
            if (j > 0) {
                if (selectEnd) {
                    ret = MathUtility.add(ret, dp[i - 1][j - 1][1], MOD);
                    ret = MathUtility.add(ret, 1, MOD);
                } else {
                    ret = MathUtility.add(ret, dp[i - 1][j - 1][0], MOD);
                }
            }
            return ret;
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void print(int i) {
            writer.print(i);
        }

    }

    static class MathUtility {
        public static int add(int a, int b, int MOD) {
            int res = a + b;
            if (res >= MOD) {
                res -= MOD;
            }
            return res;
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        D solver = new D();
        solver.solve(1, in, out);
        out.close();
    }

    static class D {
        long mod = (int) 1e9 + 7;
        Long[][][] dp;

        long go(int rem, int open, int used) {
            if (rem == 0)
                return 0;
            if (dp[used][rem][open] != null)
                return dp[used][rem][open];
            if (rem < open)
                throw new RuntimeException();

            if (rem == open) {
                if (used == 1)
                    return dp[used][rem][open] = go(rem - 1, open - 1, 0);
                else {
                    return dp[used][rem][open] = 1 + go(rem - 1, open - 1, 1);
                }
            }
            if (used == 1) {
                long res = 0;
                if (open > 0)
                    res += go(rem - 1, open - 1, 0);
                res = (res + go(rem - 1, open + 1, 0)) % mod;
                return dp[used][rem][open] = res;
            } else {
                long res = 1;//use (
                if (open > 0)
                    res += go(rem - 1, open - 1, 0);
                res = (res + go(rem - 1, open + 1, 1)) % mod;
                return dp[used][rem][open] = res;
            }
        }

        public void solve(int testNumber, FastScanner in, PrintWriter out) {
            int n = in.ni();
            dp = new Long[2][2 * n + 3][2 * n + 3];
            out.println(go(2 * n, 0, 0));
        }

    }

    static class FastScanner {
        private BufferedReader in;
        private StringTokenizer st;

        public FastScanner(InputStream stream) {
            in = new BufferedReader(new InputStreamReader(stream));
        }

        public String ns() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }

        public int ni() {
            return Integer.parseInt(ns());
        }

    }
}


import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;

public class Main {

	static PrintWriter out;
	static InputReader ir;
	static boolean debug = true;
	static long[][][] dp;
	static long mod = (long) 1e9 + 7;

	static void solve() {
		int n = ir.nextInt();
		dp = new long[n + 1][n + 1][2];
		for (int i = 0; i <= n; i++)
			for (int j = 0; j <= n; j++)
				Arrays.fill(dp[i][j], -1);
		dp[1][0][0] = 1;
		dp[1][0][1] = 1;
		dp[1][1][0] = 1;
		dp[1][1][1] = 0;
		out.println(dfs(n, 0, 0));
	}

	static long dfs(int x, int d, int k) {
		if (dp[x][d][k] >= 0)
			return dp[x][d][k];
		else if (x == d)
			return dp[x][d][k] = ((k == 0) ? ((x + 1) / 2) : (x / 2));
		else if (d == 0)
			return dp[x][d][k] = dfs(x, 1, k ^ 1) + (k == 0 ? 1 : 0);
		if (k == 0) {
			return dp[x][d][k] = (dfs(x - 1, d - 1, 1) + dfs(x, d + 1, 0) + 1) % mod;
		} else
			return dp[x][d][k] = (dfs(x - 1, d - 1, 0) + dfs(x, d + 1, 0)) % mod;
	}

	public static void main(String[] args) {
		ir = new InputReader(System.in);
		out = new PrintWriter(System.out);
		solve();
		out.flush();
	}

	static class InputReader {

		private InputStream in;
		private byte[] buffer = new byte[1024];
		private int curbuf;
		private int lenbuf;

		public InputReader(InputStream in) {
			this.in = in;
			this.curbuf = this.lenbuf = 0;
		}

		public boolean hasNextByte() {
			if (curbuf >= lenbuf) {
				curbuf = 0;
				try {
					lenbuf = in.read(buffer);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (lenbuf <= 0)
					return false;
			}
			return true;
		}

		private int readByte() {
			if (hasNextByte())
				return buffer[curbuf++];
			else
				return -1;
		}

		private boolean isSpaceChar(int c) {
			return !(c >= 33 && c <= 126);
		}

		private void skip() {
			while (hasNextByte() && isSpaceChar(buffer[curbuf]))
				curbuf++;
		}

		public boolean hasNext() {
			skip();
			return hasNextByte();
		}

		public String next() {
			if (!hasNext())
				throw new NoSuchElementException();
			StringBuilder sb = new StringBuilder();
			int b = readByte();
			while (!isSpaceChar(b)) {
				sb.appendCodePoint(b);
				b = readByte();
			}
			return sb.toString();
		}

		public int nextInt() {
			if (!hasNext())
				throw new NoSuchElementException();
			int c = readByte();
			while (isSpaceChar(c))
				c = readByte();
			boolean minus = false;
			if (c == '-') {
				minus = true;
				c = readByte();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res = res * 10 + c - '0';
				c = readByte();
			} while (!isSpaceChar(c));
			return (minus) ? -res : res;
		}

		public long nextLong() {
			if (!hasNext())
				throw new NoSuchElementException();
			int c = readByte();
			while (isSpaceChar(c))
				c = readByte();
			boolean minus = false;
			if (c == '-') {
				minus = true;
				c = readByte();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res = res * 10 + c - '0';
				c = readByte();
			} while (!isSpaceChar(c));
			return (minus) ? -res : res;
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public int[] nextIntArray(int n) {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public long[] nextLongArray(int n) {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextLong();
			return a;
		}

		public char[][] nextCharMap(int n, int m) {
			char[][] map = new char[n][m];
			for (int i = 0; i < n; i++)
				map[i] = next().toCharArray();
			return map;
		}
	}

	static void tr(Object... o) {
		if (debug)
			out.println(Arrays.deepToString(o));
	}
}


import java.util.*;
import java.io.*;
import java.math.BigInteger;
import static java.lang.Math.*;

/* spar5h */

public class cf4 implements Runnable {

	long[][][] dp;
	long mod = (long)1e9 + 7;

	void recur(int n, int k, int x) {

		dp[n][k][x] = 0;

		if(k == dp[n].length - 1) {

			if(n != 0)
				dp[n][k][x] = -2;

			return;
		}

		int c = 0;

		if(x == 0) {

			if(n > 0) {

				if(dp[n - 1][k + 1][1] == -1)
					recur(n - 1, k + 1, 1);

				if(dp[n - 1][k + 1][1] != -2) {
					dp[n][k][0] = (dp[n - 1][k + 1][1] + dp[n][k][0]) % mod;
					c++;
				}
			}

			if(dp[n + 1][k + 1][1] == -1)
				recur(n + 1, k + 1, 1);

			if(dp[n + 1][k + 1][1] != -2) {
				dp[n][k][0] = (dp[n + 1][k + 1][1] + dp[n][k][0]) % mod;
				c++;
			}
		}

		else if(x == 1) {

			dp[n][k][x] = 1;

			if(n > 0) {

				if(dp[n - 1][k + 1][0] == -1)
					recur(n - 1, k + 1, 0);

				if(dp[n - 1][k + 1][0] != -2) {
					dp[n][k][1] = (dp[n - 1][k + 1][0] + dp[n][k][1]) % mod;
					c++;
				}

				if(dp[n + 1][k + 1][1] == -1)
					recur(n + 1, k + 1, 1);

				if(dp[n + 1][k + 1][1] != -2) {
					dp[n][k][1] = (dp[n + 1][k + 1][1] + dp[n][k][1]) % mod;
					c++;
				}
			}

			else {

				if(dp[n + 1][k + 1][0] == -1)
					recur(n + 1, k + 1, 0);

				if(dp[n + 1][k + 1][0] != -2) {
					dp[n][k][1] = (dp[n + 1][k + 1][0] + dp[n][k][1]) % mod;
					c++;
				}
			}

		}

		if(c == 0)
			dp[n][k][x] = -2;
	}

	public void run() {

		InputReader s = new InputReader(System.in);
		PrintWriter w = new PrintWriter(System.out);

		int n = s.nextInt();

		dp = new long[2 * n + 1][2 * n + 1][2];
		for(int i = 0; i <= 2 * n; i++)
			for(int j = 0; j <= 2 * n; j++)
				for(int k = 0; k < 2; k++)
					dp[i][j][k] = -1;

		recur(0, 0, 1);

		w.println(dp[0][0][1]);

		w.close();
	}

	static class InputReader {

		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int read() {

			if (numChars==-1)
				throw new InputMismatchException();

			if (curChar >= numChars) {

				curChar = 0;

				try {
					numChars = stream.read(buf);
				}
				catch (IOException e) {
					throw new InputMismatchException();
				}

				if(numChars <= 0)
					return -1;
			}

			return buf[curChar++];
		}

		public String nextLine() {

			BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
			String str = "";

			try {
	            str = br.readLine();
	        }
	        catch (IOException e) {
	            e.printStackTrace();
	        }

	        return str;
		}

		public int nextInt() {

			int c = read();

			while(isSpaceChar(c))
				c = read();

			int sgn = 1;

			if (c == '-') {
				sgn = -1;
				c = read();
			}

			int res = 0;

			do {
				if(c<'0'||c>'9')
					throw new InputMismatchException();

				res *= 10;
				res += c - '0';
				c = read();
			}
			while (!isSpaceChar(c));

			return res * sgn;
		}

		public long nextLong() {

			int c = read();

			while (isSpaceChar(c))
				c = read();

			int sgn = 1;

			if (c == '-') {
				sgn = -1;
				c = read();
			}

			long res = 0;

			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();

				res *= 10;
				res += c - '0';
				c = read();
			}

			while (!isSpaceChar(c));
				return res * sgn;
		}

		public double nextDouble() {

			int c = read();

			while (isSpaceChar(c))
				c = read();

			int sgn = 1;

			if (c == '-') {
				sgn = -1;
				c = read();
			}

			double res = 0;

			while (!isSpaceChar(c) && c != '.') {

				if (c == 'e' || c == 'E')
					return res * Math.pow(10, nextInt());

				if (c < '0' || c > '9')
					throw new InputMismatchException();

				res *= 10;
				res += c - '0';
				c = read();
			}

			if (c == '.') {

				c = read();
				double m = 1;
				while (!isSpaceChar(c))
				{
					if (c == 'e' || c == 'E')
						return res * Math.pow(10, nextInt());
					if (c < '0' || c > '9')
						throw new InputMismatchException();
					m /= 10;
					res += (c - '0') * m;
					c = read();
				}
			}

			return res * sgn;
		}

		public String readString() {

			int c = read();

			while (isSpaceChar(c))
				c = read();

			StringBuilder res = new StringBuilder();

			do {
				res.appendCodePoint(c);
				c = read();
			}
			while (!isSpaceChar(c));

			return res.toString();
		}

		public boolean isSpaceChar(int c) {

			if (filter != null)
				return filter.isSpaceChar(c);

			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public String next() {
			return readString();
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}

	}

	public static void main(String args[]) throws Exception {
		new Thread(null, new cf4(),"cf4",1<<26).start();
	}
}


//JDope
import java.util.*;
import java.io.*;
import java.math.*;
public class D{
public static void main(String[] omkar) throws Exception
{
   BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
   StringTokenizer st = new StringTokenizer(in.readLine());
   StringBuilder sb = new StringBuilder();
   int n = Integer.parseInt(st.nextToken());
   int[][] mat = new int[n+1][n+1];
   long sum = 0;
   for(int i = 0; i < n+1; i++)
   {
      mat[i][0] = 1;
      if((i+0) % 2 == 1)
      {
         sum += mat[i][0];
         sum = sum % 1000000007;
      }
   }
   for(int i = 1; i < n+1; i++)
   {
      for(int j = i; j < n+1; j++)
      {
         mat[j][i] = (mat[j][i-1] + mat[j-1][i]) % 1000000007;
         if((i+j) % 2 == 1)
         {
            sum += mat[j][i];
            sum = sum % 1000000007;
         }
      }
   }
   System.out.println(sum);

        }
 public static int[] readArr(int N, BufferedReader in, StringTokenizer st) throws Exception
      {
         int[] arr = new int[N];
         st = new StringTokenizer(in.readLine());
         for(int i=0; i < N; i++)
            arr[i] = Integer.parseInt(st.nextToken());
         return arr;
      }

}


//package com.company;
// Always comment out package when submitting.

import java.io.*;
import java.util.*;

public class Main {
    public static class Task {
        int mod = 1_000_000_007;
        public void solve(Scanner sc, PrintWriter pw) throws IOException {
            int n = sc.nextInt();
            long[][] dp0 = new long[n + 1][n + 1];
            long[][] dp1 = new long[n + 1][n + 1];
            for (int ij = 2 * n; ij >= 0; ij--) {
                for (int i = 0; i <= n; i++) {
                    int j = ij - i;
                    if (i < 0 || j < 0) continue;
                    if (j > i) continue;
                    if (i == n && j == n) continue;
                    if (i == j) {
                        dp0[i][j] = Math.max(1 + dp1[i + 1][j], dp0[i + 1][j]);
                    } else if ( i == n) {
                        dp0[i][j] = Math.max(1 + dp1[i][j + 1], dp0[i][j + 1]);
                    } else {
                        long v1 = (dp0[i + 1][j] + dp0[i][j + 1]) % mod;
                        long v2 = (1 + dp1[i + 1][j] + dp0[i][j + 1]) % mod;
                        long v3 = (1 + dp0[i + 1][j] + dp1[i][j + 1]) % mod;
                        dp0[i][j] = Math.max(v1, Math.max(v2, v3));
                    }
                    if (i == j) {
                        dp1[i][j] = dp0[i + 1][j];
                    } else if ( i == n) {
                        dp1[i][j] = dp0[i][j + 1];
                    } else {
                        long v1 = (dp0[i + 1][j] + dp0[i][j + 1]) % mod;
                        dp1[i][j] = v1;
                    }
                }
            }
            pw.println(dp0[0][0] % mod);

        }
    }

    // template, actual code is in class Task.
    static long TIME_START, TIME_END;

    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
//        Scanner sc = new Scanner(new FileInputStream("Test.in"));
        PrintWriter pw = new PrintWriter(new BufferedOutputStream(System.out));
//        PrintWriter pw = new PrintWriter(new FileOutputStream("Test.out"));

        Runtime runtime = Runtime.getRuntime();
        long usedMemoryBefore = runtime.totalMemory() - runtime.freeMemory();
        TIME_START = System.currentTimeMillis();
        Task t = new Task();
        t.solve(sc, pw);
        TIME_END = System.currentTimeMillis();
        long usedMemoryAfter = runtime.totalMemory() - runtime.freeMemory();
        pw.close();
//        System.err.println("Memory increased: " + (usedMemoryAfter - usedMemoryBefore) / 1000000);
//        System.err.println("Time used: " + (TIME_END - TIME_START) + ".");
    }

    // Faster IO with BufferedReader wrapped with Scanner
    static class Scanner {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Scanner(FileReader s) throws FileNotFoundException {
            br = new BufferedReader(s);
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public boolean ready() throws IOException {
            return br.ready();
        }
    }
}