#include using namespace std; int n, m; int main(){ cin >> n >> m; cout << n - 1 + m - 1; }