#define _USE_MATH_DEFINES // for C++  
#include <cmath> 
#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <algorithm>
#include <array>
#include <iterator>
#include <utility>
#include <set>
#include <random>
#include <map>
#include <stack>
#include <queue>
#include <list>
#include <functional>
#include <bitset>
#define LL long long

using namespace std;

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

}