#define _USE_MATH_DEFINES #include //cin, cout #include //vector #include //sort,min,max,count #include //string,getline #include //fixed #include //setprecision #include //swap, pair #include //abs(int) #include //sqrt,ceil,M_PI, pow, sin #include //stringstream,getline #include //gcd, accumlate #include //deque using namespace std; int main() { int a, b, n; cin >> a >> b >> n; vector R(n); for (int i = 0; i < n; i++) { cin >> R[i]; } sort(R.begin(), R.end()); R.erase(std::unique(R.begin(), R.end()), R.end()); int ans = (a + b) * (n - R.size()); cout << ans << endl; return 0; }