#include <iostream>                                            
using namespace std;                                           
                                                               
int main() {                                                   
  int N, M;                                                    
  cin >> N >> M;                                               
  int a[M];                                                    
  for (int i=0; i<M; i++) {                                    
    cin >> a[i];                                               
  }                                                            
  int ans = N-M-1;                                             
  cout << ans << endl;                                         
  return 0;                                                    
}                 