1771: 【CSP循环-穷举】- 买小猫小狗▅

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:10 Solved:5

Description

某动物饲养中心用 lns="http://www.w3.org/1998/Math/MathML">X 元专款购买小狗(每只 lns="http://www.w3.org/1998/Math/MathML">A 元)和小猫(每只lns="http://www.w3.org/1998/Math/MathML">B 元)两种小动物。

要求专款专用,(至少猫狗各一),正好用完。

请求出方案的总数。如没有请输出 lns="http://www.w3.org/1998/Math/MathML">0 。

Input

输入一行,只有三个整数.分别为 lns="http://www.w3.org/1998/Math/MathML">X,A,B。( lns="http://www.w3.org/1998/Math/MathML">100<X<327681A1001B100 )

Output

输出只有一行(这意味着末尾有一个回车符号),包括 lns="http://www.w3.org/1998/Math/MathML">1 个整数。

Sample Input Copy

120 7 8

Sample Output Copy

2