#include <stdio.h>
#include <iostream>
#include <cstdlib>

using namespace std ;

int main()
{
    
    int n , m , k , a , b ;
    
    cin >> n >> m >> k ;
    
    for ( int i = 0 ; i < k ; i++ )
    {
      cin >> a ;
      cin >> b ;
        
    }
    
    cout << k/2+1;
    
    return 0;
    
}