Problem1881--组合数

1881: 组合数

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

Description

有两堆连续的数字,第一堆包含[1,n]n个数字,第二堆包含[1,m]m个数字,现想要从两堆中各挑选出一个整数x,y,使得x,y的和为7的倍数,请问有多少种组合的方式。

Input

n和m(1<=m,n<=1000000)

Output

多少种组合。 

Sample Input Copy

6 7

Sample Output Copy

6

HINT

(1,6),(2,5),(3,4),(4,3),(5,2),(6,1)

Source/Category

admin