#include <bits/stdc++.h>
using namespace std;
//ofstream cout("output.out");

#define fast() {ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);}
#define pb push_back
#define vi vector<int>
#define vl vector<ll>					
#define vii vector<vector<int>>
#define mii map<int, int>
#define pii pair<int, int>
#define qii priority_que<int, vector<int>, greater<int>>				
#define For(i, n) for(int i = 0; i < n; ++i)
#define For1(i, n) for(int i = 1; i <= n; ++i)
#define Forlr(i, l, r) for(int i = l; i <= r; ++i)
#define Forrl(i, r, l) for(int i = r; i >= l; --i)
#define o(a) { cout << #a << ":" << (a) <<" ";}
#define ov(a) {For(i, a.size()) cout << a[i] <<" ";}
#define ovv(a) {For(i, a.size()) {For(j, a[i].size()) cout << a[i][j] <<" ";cout <<"\n";}}
using ll = long long;
int n, m, k, q;
const int INF = 1e9 + 5;
const int nax = 1e5 + 5;
pair<int, int> a[5 * nax];
int d[1505][1505][2];
int g[1505][1505];
ll rs = 0;
void dfs(int x, int y){
	int nx = x, ny = y;
	//if(!g[nx][ny] && !d[nx][ny][1] && !d[nx][ny][0]) rs ++, g[nx][ny] = 1;
	while(1){
		nx ++;
		if(nx <= n && !d[nx][ny][0] && !g[nx][ny]){
			if(!d[nx][ny][1]) rs ++;
			d[nx][ny][0] = 1;
		}
		else{
			break;
		}
	}
	nx = x;
	while(1){
		nx --;
		if(nx >= 1 && !d[nx][ny][0] && !g[nx][ny]){
			if(!d[nx][ny][1]) rs ++;
			d[nx][ny][0] = 1;
		}
		else{
			break;
		}
	}
	nx = x;
	while(1){
		ny ++;
		if(ny <= m && !d[nx][ny][1] && !g[nx][ny]){
			if(!d[nx][ny][0]) rs ++;
			d[nx][ny][1] = 1;
		}
		else{
			break;
		}
	}
	ny = y;
	while(1){
		ny --;
		if(ny >= 1 && !d[nx][ny][1] && !g[nx][ny]){
			if(!d[nx][ny][0]) rs ++;
			d[nx][ny][1] = 1;
		}
		else{
			break;
		}
	}
}
int main()
{
	fast();
	cin >> n >> m;
	int na, nb;
	cin  >> na >> nb;
	For(i, na){
		cin >> a[i].first >> a[i].second;
		g[a[i].first][a[i].second] = 1;
		rs++;
	}
	For(i, nb){
		int x, y;
		cin >> x >> y;
		g[x][y] = 1;
	}
	For(i, na){
		dfs(a[i].first, a[i].second);
	}
	// For(i, n){
	// 	For(j, m){
	// 		cout << g[i + 1][j + 1] <<" "; 
	// 	}
	// 	cout <<"\n";
	// }
	cout << rs;
}
 #include <bits/stdc++.h>
#define fo(i, k, n) for (ll i = k; i < n; i++)
#define rfo(i, k, n) for (ll i = k; i >= n  ; i--)
#define ll long long
#define ld long double
#define que queue
#define pb push_back
#define mp make_pair
#define vi vector<int>
#define vl vector<ll>
#define gcd(m,n) __gcd( m,  n)
#define sq(x)   (x*x)
#define rev(v)  reverse(v.begin(),v.end())
#define srt(v)  sort(v.begin(),v.end())
#define grtsrt(v) sort(v.begin(),v.end(),greater<int>())
#define mnv(v)     *min_element(v.begin(),v.end())
#define mxv(v)    *max_element(v.begin(),v.end())
#define all(v)    v.begin(),v.end()
#define integer(s) stoi(s)
#define intoString(num) to_string(num);

 
using namespace std;
ll MOD = 1e9 + 7;
//--------------------------------------------functions-------------------------------------------------//
 
ll power(ll a,ll b){ll result=1;while(b>0){if(b%2 == 1){result *= a;} a *= a;b /= 2;}return result;}
ll countSetBits(ll x){ll Count=0;while(x>0){if(x&1) Count++;x=x>>1;}return Count;}
bool isPerfectSquare(ll n){ll sr = sqrt(n);if (sr * sr == n)return true;else return false;}
ll mod(ll x,ll M){return ((x%M + M)%M);}
ll mul(ll a, ll b,ll M){return mod(mod(a,M)*mod(b,M),M);}
ll powerM(ll a,ll b,ll M){
    ll res=1ll;
    while(b){
        if(b%2ll==1ll){
            res=mul(a,res,M);
        }
        a=mul(a,a,M);b/=2ll;
    }
    return res;
}

//--------------------------------------------SieveOfEratosthenes-------------------------------------------------//
//mem will have true if its prime.
void SieveOfEratosthenes( vector<bool>&mem)
{ ll n = 1e6 +1;
    
    bool prime[n + 1];
    memset(prime, true, sizeof(prime));
 
    for (int p = 2; p * p <= n; p++)
    {
        
        if (prime[p] == true)
        {
            for (int i = p * p; i <= n; i += p)
                prime[i] = false;
        }
    }
 
     fo(i,2,n)
     if(prime[i])mem[i]=true;
    
}


//--------------------------------------------solve-------------------------------------------------//



int main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  
 string s;
cin>>s;

int k;
cin>>k;

ll temp;
 fo(i,0,k)
 { temp = stoll(s);
  if(temp%200)
  {
    s = s + "200";

  }
  else
  {
    temp /= 200;
    s=intoString(temp);
     

  }

 }
 cout<<s<<endl;

 
 
 
  return 0;
}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 
