
#include <iostream>

int main()
{
  int a, b, c, d;
  std::cin >> a >> b >> c >> d;
  std::cout << b - c << std::endl;
  return 0;
}

#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; (i) < (int)(n); ++(i))
#define REP3(i, m, n) for (int i = (m); (i) < (int)(n); ++(i))
#define REP_R(i, n) for (int i = (int)(n)-1; (i) >= 0; --(i))
#define REP3R(i, m, n) for (int i = (int)(n)-1; (i) >= (int)(m); --(i))
#define ALL(x) ::std::begin(x), ::std::end(x)
using namespace std;

int64_t solve(int64_t a, int64_t b, int64_t c, int64_t d) {
    // TODO: edit here
    return b - c;
}

// generated by oj-template v4.7.2 (https://github.com/online-judge-tools/template-generator)
int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    constexpr char endl = '\n';
    int64_t a, b, c, d;
    cin >> a >> b >> c >> d;
    auto ans = solve(a, b, c, d);
    cout << ans << endl;
    return 0;
}
