Problem A: 解方程

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:133 Solved:71

Description

a*x12+b*x22+c*x32+d*x42=0,a,b,c,d是区间[-50,50]内的整数。

求满足以下条件的方程解(x1,x2,x3,x4)的个数。xi是区间[-100,100]内的非零整数。

Input

输入四个整数,表示a,b,c,d

Output

输出一个整数,表示解的个数

Sample Input Copy

1 2 3 -4

Sample Output Copy

39088