1740: 【CSP循环】爱因斯坦的数学题▅

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

Description

爱因斯坦出了一道这样的数学题:有一条长阶梯,若每步跨 lns="http://www.w3.org/1998/Math/MathML">2 阶,则最最后剩一阶,若每步跨 lns="http://www.w3.org/1998/Math/MathML">3 阶,则最后剩 lns="http://www.w3.org/1998/Math/MathML">2 阶,若每步跨 lns="http://www.w3.org/1998/Math/MathML">5 阶,则最后剩 lns="http://www.w3.org/1998/Math/MathML">4 阶,若每步跨 lns="http://www.w3.org/1998/Math/MathML">6 阶则最后剩 lns="http://www.w3.org/1998/Math/MathML">5 阶。

只有每次跨 lns="http://www.w3.org/1998/Math/MathML">7 阶,最后才正好一阶不剩。

请问这条阶梯最少共有多少阶?

Output

这条阶梯最少的阶数。