5618: Q45-2 幸存士兵

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:31 Solved:24

Description

韩信带 1500 名士兵打仗,战死四五百人,幸存的士兵站3 人一排,多出2; 5 人一排,多出4;7人一排,多出6人,算一算幸存的士兵至少有多少人?

Input

Output

幸存士兵的数量

Sample Input Copy

Sample Output Copy

1049