//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
//#include <atcoder/all>
//using namespace atcoder;
using namespace std;
#define all(v) v.begin(), v.end()
using in = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define Yes cout<<"Yes"<<endl
#define No cout<<"No"<<endl
#define yes cout<<"yes"<<endl
#define no cout<<"no"<<endl
#define YES cout<<"YES"<<endl
#define NO cout<<"NO"<<endl
const in MOD = 1000000007;
const in INF=(in)1e18+7;
const int inf=max(int(1e18)+7,int(1e9)+7);
using P=pair<int,int>;
using T=tuple<int,int,int>;
vector<int> dx={0,1,-1,0};
vector<int> dy={1,0,0,-1};
template <typename Typ>
bool chmin(Typ &a, const Typ& b) {if (a > b) {a = b; return true;} return false;}
template <typename Typ>
bool chmax(Typ &a, const Typ& b) {if (a < b) {a = b; return true;} return false;}
template <typename Typ>
Typ ceil(Typ x, Typ y){return (x+y-1)/y;}
#ifdef  _DEBUG
    #define debug(x) cout<<"debug:"<<x<<endl
    #define vdebug(x) cout<<"debug:";\
                      for(auto asdf:x) cout<<asdf<<" ";\
                      cout<<endl
#else
    #define debug(x) 
    #define vdebug(x) 
#endif

int main(){
ios::sync_with_stdio(false);cin.tie(nullptr);
//cout << fixed << setprecision(12);
    int n,m;  cin>>n>>m;
    vector<int> a(m),b(m);
        rep(i,m) cin>>a[i]>>b[i];
    int k;  cin>>k;
    vector<int> c(k),d(k);
        rep(i,k) cin>>c[i]>>d[i];
    int ans=0;
    for(int tmp = 0;tmp< (1<<k); tmp++){
        bitset<16> bt(tmp);
        vector<bool> num(n,false);
        rep(i,k){
            if(bt.test(i)) num[d[i]-1]=true;
            else num[c[i]-1]=true;
        }
        int cnt=0;
        rep(i,m){
            if(num[a[i]-1] and num[b[i]-1]) cnt ++;
        }
        chmax(ans,cnt);
    }
    cout<<ans<<"\n";
    
}/*
./problem.exe
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;

using ll = long long;
using ld = long double;
using ordered_set = tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>;

void fastio() {
	cin.tie(nullptr);
	cin.sync_with_stdio(false);
}

const ll MOD = 1e9+7;
const ll INF = 1e18;
const ll N = 2e5+5;

#define S second
#define F first
#define vt vector
#define rep(i, st, en) for(ll i = (st); i < (en); ++i)
#define repr(i, en, st) for(ll i = (en); i >= (st); --i)

int main() {
	fastio();

	ll r, x, y;
	cin >> r >> x >> y;

	ll d2 = x*x + y*y;
	ll r2 = r*r;

	ll n = sqrtl(d2/r2);
	while (r2*n*n < d2) {
		n++;
	}

	if (r2 > d2) {
		n = 2;
	}

	cout << n << "\n";

}