#include<iostream>
#include<vector>

using namespace std;

int main () {
    int n, m;
    cin >> n >> m;
    vector<int> a(m);
    for(int i = 0; i < m; i++) cin >> a[i];
    n -= m;
    cout << n - 1 << endl;
}
