This page is still under construction.

Parts of this page are still being built. What you see may change.

What is n, Daddy?

Interview

Time limit2sMemory limit512 MB

Summary
Count the ordered pairs (a, b) with 1 <= b <= a <= 5 and possibly a single hand, summing to n.
Level

Easy2 of 10

Topics
Math, Brute force, Implementation, Combinatorics
Solved
No attempts yet

Problem

Natalie is learning to count on her fingers. When her Daddy tells her a number nn (1≤n≤101 \le n \le 10), she asks "What is nn, Daddy?", meaning "How many fingers should I hold up on each hand so that the total is nn?"

Each hand can hold up at most 5 fingers. Her Daddy gives the correct finger representations according to the following rules:

  • the number may be represented on one hand or on two hands;
  • if the number is represented on two hands, each hand holds up at least one finger, and the larger number is given first.

For example, if Natalie asks "What is 4, Daddy?", her Daddy may reply:

  • 4 is 4.
  • 4 is 3 and 1.
  • 4 is 2 and 2.

Your job is to count how many different answers Daddy can give.

Input

The input consists of a single integer nn with 1≤n≤101 \le n \le 10.

Output

Output the number of ways to represent nn with the fingers, following the rules above.

Examples1

  1. Example 1

    Input
    4
    
    Expected output
    3