import java.io.*; import java.util.*; class Main { static final long MOD=1000000007; static int[]c,o; static SegmentTree seg; static void update(int i){ if(o[i]==1) seg.update(i,new long[]{-1,0,c[i]}); else seg.update(i,new long[]{c[i],0,1}); } public static void main(String[] args) { MyScanner sc = new MyScanner(); out = new PrintWriter(new BufferedOutputStream(System.out)); int n=sc.nextInt(); c=new int[n/2+1]; o=new int[n/2+1]; for(int i=0;i=0) for(int j=0;j<2;++j)ans=(ans+res[j])%MOD; if(o[y/2]==1) ans=(ans+res[2])%MOD; out.println(ans); } } out.close(); } // http://codeforces.com/blog/entry/7018 //-----------PrintWriter for faster output--------------------------------- public static PrintWriter out; //-----------MyScanner class for faster input---------- public static class MyScanner { BufferedReader br; StringTokenizer st; public MyScanner() { 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; } } } class SegmentTree { static final int SIZE = 1 << 18; static final long MOD=1000000007; long[][] seg; SegmentTree() { this.seg = new long[2 * SIZE][3]; for(int i=0;i<2*SIZE;++i){ seg[i][0]=-1; seg[i][2]=1; } } static long[]comb(long[]a,long[]b){ if(a[0]==-1&&b[0]==-1) return new long[]{-1,0,a[2]*b[2]%MOD}; if(a[0]==-1&&b[0]>=0) return new long[]{a[2]*b[0]%MOD,b[1],b[2]}; if(a[0]>=0&&b[0]==-1) return new long[]{a[0],a[1],a[2]*b[2]%MOD}; return new long[]{a[0],(a[1]+b[1]+a[2]*b[0])%MOD,b[2]}; } void update(int x, long[]value) { x += SIZE - 1; for(int i=0;i<3;++i) this.seg[x][i] = value[i]; while (x > 0) { x = (x - 1) / 2; this.seg[x] = comb(this.seg[2 * x + 1], this.seg[2 * x + 2]); } } long[]query(int a,int b,int l,int r,int k){ if(a<=l&&r<=b)return seg[k]; if(b<=l||r<=a) return new long[]{-1,0,1}; long[]ans1=query(a,b,l,(l+r)/2,2*k+1); long[]ans2=query(a,b,(l+r)/2,r,2*k+2); return comb(ans1,ans2); } long[]query(int l, int r) { return query(l,r,0,SIZE,0); } }