Problem2341--How many?

2341: How many?

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description

Time Limit: 2 sec / Memory Limit: 1024 MB

Score : 200200 points

Problem Statement

How many triples of non-negative integers (a, b, c)(a,b,c) satisfy a+b+c \leq Sa+b+cS and a \times b \times c \leq Ta×b×cT?

Constraints

  • 0 \leq S \leq 1000S100
  • 0 \leq T \leq 100000T10000
  • SS and TT are integers.

Input

Input is given from Standard Input in the following format:
SSTT

Output

Print the number of triples of non-negative integers (a,b,c)(a,b,c) satisfying the conditions.

Sample Input Copy

1 0

Sample Output Copy

4

HINT

The triples (a,b,c)(a,b,c) satisfying the conditions are (0,0,0)(0,0,0)(0,0,1)(0,0,1)(0,1,0)(0,1,0), and (1,0,0)(1,0,0) ― there are four of them.

Source/Category