题目描述
Let's call the set of positive integers $S$ correct if the following two conditions are met:
- $S \subseteq \{1, 2, \dots, n\}$;
- if $a \in S$ and $b \in S$, then $|a-b| \neq x$ and $|a-b| \neq y$.
For the given values $n$, $x$, and $y$, you have to find the maximum size of the correct set.
Input
A single line contains three integers $n$, $x$ and $y$ ($1 \le n \le 10^9$; $1 \le x, y \le 22$).
Output
Print one integer — the maximum size of the correct set.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分
样例输入
10 2 5
样例输出
5