#include using namespace std; int main() { int n, a1st, a; cin >> n >> a1st; for(int i = 1; i < n; i++){ cin >> a; } cout << a1st - 1 << endl; return 0; }