#include "bits/stdc++.h"
using namespace std;
#define mod 1000000007
using ll = long long;
int dd[] = { 0, 1, 0, -1, 0 }; //→↓←↑

void solve()
{
	int n, m, a;
	cin >> n >> m;
	for (int i = 0; i < m; i++)
	{
		cin >> a;
	}
	cout << (n - m - 1) << endl;
}

int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);
	solve();
	return 0;
}
