PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#QHD0000050. Đổi tiền xu (Coin Change)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Đổi tiền xu (Coin Change)

Coin Change

Source: UVa

Version: Phuoc Hung OJ Extended

Problem Statement

You must make change for xx cents using denominations 1,5,10,25,501,5,10,25,50. Every denomination has unlimited supply. Two arrangements using the same numbers of each denomination count as one combination. Count the ways to reach exactly xx cents. For x=0x=0, there is exactly one way: use no coins.

Input

A single line contains the integer amount xx in cents.

Output

Print the exact number of combinations without applying a modulus.

Subtasks

The independent scoring groups have the following complete constraints:

  • Subtask 1 (20%): 0≤x≤200\le x\le20, denominations 1,5,10,25,501,5,10,25,50.
  • Subtask 2 (30%): 0≤x≤5000\le x\le500, denominations 1,5,10,25,501,5,10,25,50.
  • Subtask 3 (50%): 0≤x≤74890\le x\le7489, denominations 1,5,10,25,501,5,10,25,50.

Examples

Input

11

Output

4

Explanation

There are four unordered combinations: 10+110+1, 5+5+15+5+1, 5+1+1+1+1+1+15+1+1+1+1+1+1, and eleven 11-cent coins. The result is 44.