Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

var sc = bufio.NewScanner(os.Stdin)

//Sliceconvtoi ...
func Sliceconvtoi() []int {
	strs := strings.Split(sc.Text(), " ")

	var ints []int
	var x int

	for _, s := range strs {
		x, _ = strconv.Atoi(s)
		ints = append(ints, x)
	}

	return ints
}

func main() {
	for sc.Scan() {
		d := Sliceconvtoi()
		fmt.Println(d[0] - d[1] - d[2] + d[3])
	}
}

Python: n, a, b, c = map(int, input().split())
print(n-a-b+c)

Python: N, A, B, C = map(int, input().split())

print(N - A - B + C)

Python: N, A, B, C = [int(x) for x in input().split()]
ans = N - (A + B) + C
print(ans)

Python: n, a, b, c = map(int, input().split())
print(n-(c+a-c+b-c))

Python: n,a,b,c = map(int,input().split())
print(n - (a+b-c))

Python: n,a,b,c=map(int,input().split())
print((n+c)-(a+b))

Python: n,a,b,c=map(int,input().split())
print(n-a-b+c)

Python: n,a,b,c=map(int,input().split())
print(n-a-b+c)

Python: n,a,b,c = map(int,input().split())
print(n-a-b+c)

Python: n,a,b,c = map(int, input().split())
print(n-a-b+c)

Python: n,a,b,c = map(int,input().split())
print(n - (a+b-c))

Python: n,a,b,c=map(int,input().split());print(n-a-b+c)

Python: N,A,B,C=map(int,input().split())
print(N-A-B+C)

Python: n,a,b,c = map(int,input().split())
print(n - (a + b - c))

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

#define FOR( i, m, n )   for( int i = m; i < n; i++ )
#define REP( i, n )      FOR( i, 0, n )
#define ALL( a )         (a).begin(), (a).end()

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

  cout << n - a - b + c << endl;
}

C++: #include <bits/stdc++.h>
using i64 = long long;
using std::cout;
using std::endl;
using std::cin;

int main() {
	int n, a, b, c; scanf("%d%d%d%d", &n, &a, &b, &c);
	
	printf("%d\n", n - (a + b - c));
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <string>
#include <queue>
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define P pair<int,int>
#define vsort(v) sort(v.begin(),v.end)
using namespace std;
signed main() {
	int n, a, b, c;
	cin >> n >> a >> b >> c;
	cout << n - (a + b - c) << endl;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main(){
    int n,a,b,c;
    cin >> n >> a >> b >> c;
    cout << n+c-a-b << endl;
    return 0;
}

C++: #include<iostream>
#include<string>
#include<iomanip>
#include<cmath>
#include<vector>
#include<algorithm>

using namespace std;

#define int long long
#define rep(i,n) for(int i = 0; i < (n); i++)
#define INF (long long)(1e18)
#define MOD (int)(1e9+7)

#define yn(f) ((f)?"Yes":"No")
#define YN(f) ((f)?"YES":"NO")

signed main(){
	cout<<fixed<<setprecision(7);

	int n, a, b, c;
	
	cin>>n>>a>>b>>c;
	
	cout<<N-(a+b-c)<<endl;
	
	return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

typedef long long ll;

signed main()
{
    int n, a, b, c;
    cin >> n >> a >> b >> c;
    cout << n - a - b + c << endl;
}

C++: #include <bits/stdc++.h>

using namespace std;

int main(){
  int n,a,b,c; cin >>n>>a>>b>>c;
  cout << n-(a+b-c)<<endl;
  
  return 0;
}

C++: #include<bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define HUGE_NUM 99999999999999999
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;



int main(){

	int N,A,B,C;

	scanf("%d %d %d %d",&N,&A,&B,&C);

	printf("%d\n",N-((A+B)-C));

	return 0;
}

C++: #include <iostream>
using namespace std;

int main() {
	int N, A, B, C;
	cin >> N >> A >> B >> C;
	cout << C + N - A - B << endl;
}

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

int main(){
    int N,A,B,C;
    cin>>N>>A>>B>>C;

    cout<<N-A-B+C<<endl;
    return 0;
}

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

int main() {
    int n, a, b, c;
    cin >> n >> a >> b >> c;
    cout << n - a - b + c << endl;
    return 0;
}