#include <bits/stdc++.h>
using namespace std;

typedef long long int ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef pair<ll, ll> Pair;
typedef vector<Pair> VP;
typedef vector<string> VS;
typedef vector<char> VC;
//typedef modint1000000007 mint;
//typedef modint998244353 mint;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, s, n) for(int i = (int)(s); i < (int)(n); i++)
#define rrep(i, n) for (int i = (int)(n); i >= 0; i--)
#define RREP(i, n, e) for(int i = (int)(n); i>= e; i--)
#define all(a) (a).begin(), (a).end()
#define VEC(n, x) VI n(x); rep(i, x) cin >> n[i];
#define MAT(m, x, y) VVI m(x, VI(y)); rep(i, x) rep(j, y) cin >> m[i][j];
#define FIX cout << fixed << setprecision(10);
#define out(x) cout << (x) << endl;
#define fin(x) { out(x); return 0; }
#define IN(x, l, r) ((l) <= (x) && (x) < (r))

const VP dir4 = { { -1, 0 }, { 1, 0 }, { 0, 1 }, { 0, -1 } };
const VP dir8 = { { -1, 0 }, { -1, 1 }, { 0, 1 }, { 1, 1 }, { 1, 0 }, { 1, -1 }, { 0, -1 }, { -1, -1 } };

template<class T> bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }

int main () {
  int A, B, C, D; cin >> A >> B >> C >> D;
  out(B - C);
  return 0;
}

#include<iostream>
using namespace std;

int main() {
	int a, b, c, d;
	cin >> a >> b;
	cin >> c >> d;

	cout << b - c << endl;

	return 0;
}