Under construction

Still being built. Things may change

Don't pass me the ball!

Time limit2sMemory limit512 MB

Summary
Given the scorer's jersey number J, count the ordered increasing 4-tuples of distinct jersey numbers ending at J.
Level

Easy3 of 10

Topics
Combinatorics, Math
Solved
No attempts yet

Problem

A soccer league plays under slightly different rules. A goal counts only when both of the following hold: the 4 players who, in order, touched the ball just before the goal have jersey numbers that are strictly increasing, and the player with the highest jersey number among them is the one who scored the goal.

Players wear jersey numbers from 11 to 9999, and each jersey number is worn by exactly one player.

Given the jersey number of the goal scorer, determine how many combinations of players can produce a valid goal.

Input

A single positive integer JJ (1≤J≤991 \le J \le 99), the jersey number of the goal scorer.

Output

Output one line containing the number of possible scoring combinations in which jersey number JJ is the goal scorer.

Examples3

  1. Example 1

    Input
    4
    
    Expected output
    1
    
  2. Example 2

    Input
    2
    
    Expected output
    0
    
  3. Example 3

    Input
    90
    
    Expected output
    113564