QOJ.ac

QOJ

Time Limit: 2 s Memory Limit: 256 MB Total points: 100

#22541. Bessie's Secret Pasture

Statistics

Farmer John has cut an almost unlimited number of square pieces of sod (grass sections) of all integer side-lengths from the pasture (sometimes FJ doesn't engage the blade properly and even makes a 0-sided sod squares). He has placed them in nicely organized piles that Bessie spotted one afternoon.

Bessie, always hoping to put delicious grass in her secret pasture, decided to carry precisely four of these sod sections over to her pasture and carve them into 1x1 sections in order to tile its $N$ ($1 \le N \le 10,000$) unit-square sections.

Bessie is interested in knowing how many different ways she can choose four sod sections to tile her secret pasture. If she had a pasture of size 4, she might haul sod squares in these five different ways: (1,1,1,1), (2,0,0,0), (0,2,0,0), (0,0,2,0), (0,0,0,2). Order counts: (4,3,2,1) is a different way of choosing than (1,2,3,4).

Input

  • Line 1: A single integer: $N$

Output

  • Line 1: A single integer that is the number of different ways Bessie can choose four sod sections for her pasture

Examples

Input 1

4

Output 1

5

Problem credits: Jeffrey Wang, 2007

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.