Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register
Language:
Holey Square Tiling
Time Limit: 10000MSMemory Limit: 131072K
Total Submissions: 931Accepted: 295

Description

Given a square of size n + 2 with a square hole of size n − 2 in the middle (see the figure below), calculate the number of different ways to tile it with dominoes of size 1 × 2.

Input

The input consists of multiple test cases. Each test case contains only one integer n (3 ≤ n ≤ 104). Process util EOF is met.

Output

For each test case, output the desired number in decimal using the comma as the thousand separator.

Sample Input

3
50

Sample Output

196
401,520,777,816,387,690,468,975,409,805,843,797,460,004

Source

[Submit]   [Go Back]   [Status]   [Discuss]

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator