#include <stdio.h>

#define MAX 50

int main ()
{
  int n,m,i,j,p,k,a,b;
  int mat[MAX][MAX];
  int mat2[MAX][MAX];
  int suma = 0;
  
  scanf ("%d%d", &n,&m);
  
  for ( i=0; i<n; i++ )
    for ( j=0; j<m; j++ )
      scanf ("%d", &mat[i][j]);
    
   
  scanf ("%d%d", &p, &k);
  
  if ( p<=n && k<=m )
  {
    for ( i=0; i<n; i++ )
      for ( j=0; j<m; j++)
      {
	mat2[p][k] = mat[i][j];
	 suma = suma + mat2[p][k];
      
      }
     printf ("%d", suma);
    
 }
  else 
    printf ("-1");
 
  
  return 0;
}