/**
 * Created by hiroqn on 13/10/08.
 */
var fs = require('fs'),
    length = fs.fstatSync(process.stdin.fd).size,
    buffer = new Buffer(length),
    bytesRead = fs.readSync(process.stdin.fd, buffer, 0, length, 0),
    input = buffer.toString('utf8', 0, bytesRead).split('\n');
main();

function matrix(n, m, init) {
  var arr = [], i, j;
  for (i = 0; i < n; i++) {
    arr[i] = [];
    for (j = 0; j < m; j++) {
      arr[i][j] = init;
    }
  }
  return arr;
}
var map, gx, gy, str;

function solve(x, y, dx, dy, cur) {
  if(map[x][y] > 0) {
    return false;
  }
  while(true) {
    if(x === gx && y === gy) {
      return true;
    }
    if(map[x + dx][y + dy] > 0) {
      if(r.length === cur) {
        return false;
      }
      if(str[cur] === 'R') {
        return solve(x, y, dx === 0 ? -dy : 0, dx === 0 ? 0: dx, cur + 1);
      } else {
        return solve(x, y, dy === 0 ? 0 : dy, dy === 0 ? -dx : 0, cur + 1);
      }
    } else{
      x +=dx;
      y +=dy;
    }
  }
  return false;
}

function main() {
  var temp = input.shift().split(' '),
      i, j,
      w = temp[0] - 0,
      h = temp[1] - 0,
      n = temp[4] - 0;

  gx = temp[2] - 0,
  gy = temp[3] - 0,
  map = matrix(w + 2, h + 2, 0);
  for (i = 0; i < w + 2; i++) {
    map[i][0] = 9;
    map[i][w + 1] = 9;
  }
  for (i = 0; i < w + 2; i++) {
    map[0][i] = 9;
    map[h + 1][i] = 9;
  }
  for (i = 0; i < n; i++) {
    temp = input.shift().split(' ');
    map[+temp[0]][+temp[1]] = 9;
  }
  str = input.shift();
  var count = 0;
  for (i = 1; i < w + 1; i++) {
    for (j = 1; j < h + 1; j++) {
      if(solve(i, j, 0, -1, 0)) {
        count++;
      }
      if(solve(i, j, 1, 0, 0)) {
        count++;
      }
      if(solve(i, j, 0, 1, 0)) {
        count++;
      }
      if(solve(i, j, -1, 0, 0)) {
        count++;
      }
    }
  }
  console.log(count);
}