Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <conio.h>
- #include <string>
- #include <set>
- #include <map>
- #include <algorithm>
- #include <string>
- #include <math.h>
- #include <vector>
- using namespace std;
- long long M, N;
- int main()
- {
- cin >> N >> M;
- if (N <= M)
- cout << N * 2 - 2 << endl;
- else
- cout << M * 2 - 1 << endl;
- _getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment