jiahuimbzuai/CoQuIR huggingface dataset:
//  [java]
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int q = sc.nextInt();
        int[] a = new int[q];
        int[] participant = new int[n];
        for (int i = 0; i < a.length; i++) {
            a[i] = sc.nextInt();
        }
        for (int i = 0; i < participant.length; i++) {
            participant[i] = k;
        }
        for (int i = 0; i < a.length; i++) {
            participant[a[i] - 1]++;
        }
        for (int i = 0; i < participant.length; i++) {
            participant[i] -= q;
        }
        for (int i = 0; i < participant.length; i++) {
            if (participant[i] > 0) {
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }
        }
        sc.close();
    }
}
//  [java]
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int q = sc.nextInt();

        List<Integer> list = new ArrayList<>();
        for(int i = 0; i < q; i++){
            list.add(sc.nextInt());
        }

        Collections.sort(list);
        int index = 0;
        for(int i = 0;i < n;i++){
            if(index < q && list.get(index) == (i+1)){
                int count = 0;
                while(index < q && list.get(index) == (i+1)){
                    index++;
                    count++;
                }
                if(count > q-k){
                    System.out.println("Yes");
                } else {
                    System.out.println("No");
                }
            } else {
                if(q < k){
                    System.out.println("Yes");
                } else {
                    System.out.println("No");
                }
            }
        }

    }
}
//  [cpp]
#include<iostream>
using namespace std;

void quicksort(int* A,int left,int right){
  if(right - left <= 1) return;

  int pivot_index = (left + right)/ 2;
  int pivot = A[pivot_index];
  swap(A[pivot_index],A[right - 1]);

  int i = left;
  for(int j = left;j < right - 1;j++){
    if(A[j] < pivot){
      swap(A[i],A[j]);
      i++;
    }
  }
  swap(A[i],A[right - 1]);
  quicksort(A,left,i);
  quicksort(A,i+1,right);

}

/* i 1-Nで i==A[j]　ならその分加える*/

int main(){
  int i,j;
  long int N,K,Q,s;
  int A[100010] = {};

  cin>>N>>K>>Q;

  for(i = 0; i<Q ;i++){
    cin >> A[i];
  }

  quicksort(A,0,Q);

  for(i=0;A[i] == 0;i++){}
  j = i;

  for(i = 1; i<N+1 ; i++){
    if(A[j] == i){
      s = 0;

      while(1){
        s++;
        if(A[j] == A[j+1]){
          j++;
        }else{
          j++;
          break;
        }
      }

      if(K + s - Q <= 0){
        cout<<"No"<<endl;
      }else{
        cout<<"Yes"<<endl;
      }

    }else{

      if(K - Q <= 0){
        cout<<"No"<<endl;
      }else{
        cout<<"Yes"<<endl;
      }

    }
  }

}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main(){
int n,k,q;
  cin >>n>>k>>q;
  
  vector<int> a(q);
  rep(i,q) cin>>a.at(i);
  sort(a.begin(),a.end());
  a.push_back(0);
  
  for(int i =1;i<=n;i++){
  int cnt =0;
  while(a.at(0)==i){
  cnt ++;
    a.erase(a.begin());
  }
    
    if(k-q+cnt>0)cout <<"Yes"<<endl;
    else cout << "No"<<endl;
  }

}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;
#define INF 1<<30
#define endl '\n'
#define maxn 100005
#define tc printf("Case %d: ", cs)
#define tcn printf("Case %d:\n", cs);
#define FASTIO ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
typedef long long ll;
const double PI = acos(-1.0);

#define dbg1(x) cerr << #x << " = " << x << endl;
#define dbg2(x, y) cerr << #x << " = " << x << ", " << #y << " = " << y << endl;
#define dbg3(x, y, z) cerr << #x << " = " << x << ", " << #y << " = " << y << ", " << #z << " = " << z << endl;
#define dbg4(w,x, y, z) cerr << #w << " = " << w << ", " <<#x << " = " << x << ", " << #y << " = " << y << ", " << #z << " = " << z << endl;

template < typename F, typename S >
ostream& operator << ( ostream& os, const pair< F, S > & p ) {
	return os << "(" << p.first << ", " << p.second << ")";
}

template < typename T >
ostream &operator << ( ostream & os, const vector< T > &v ) {
	os << "{";
	for (auto it = v.begin(); it != v.end(); ++it) {
		if ( it != v.begin() ) os << ", ";
		os << *it;
	}
	return os << "}";
}

template < typename T >
ostream &operator << ( ostream & os, const set< T > &v ) {
	os << "[";
	for (auto it = v.begin(); it != v.end(); ++it) {
		if ( it != v.begin()) os << ", ";
		os << *it;
	}
	return os << "]";
}

template < typename F, typename S >
ostream &operator << ( ostream & os, const map< F, S > &v ) {
	os << "[";
	for (auto it = v.begin(); it != v.end(); ++it) {
		if ( it != v.begin() ) os << ", ";
		os << it -> first << " = " << it -> second ;
	}
	return os << "]";
}

#define dbg(args...) do {cerr << #args << " : "; faltu(args); } while(0)

clock_t tStart = clock();
#define timeStamp dbg("Execution Time: ", (double)(clock() - tStart)/CLOCKS_PER_SEC)

void faltu () { cerr << endl; }

template <typename T>
void faltu( T a[], int n ) {
	for (int i = 0; i < n; ++i) cerr << a[i] << ' ';
	cerr << endl;
}

template <typename T, typename ... hello>
void faltu( T arg, const hello &... rest) { cerr << arg << ' '; faltu(rest...); }
// Program showing a policy-based data structure.
#include <ext/pb_ds/assoc_container.hpp> // Common file 
#include <ext/pb_ds/tree_policy.hpp>
#include <functional> // for less 
#include <iostream>
using namespace __gnu_pbds;
using namespace std;
// GNU link : https://goo.gl/WVDL6g
typedef tree<int, null_type, less_equal<int>, rb_tree_tag,
        tree_order_statistics_node_update>
        new_data_set;

/**___________________________________________________**/

map<ll, ll>mp;

int main()
{
	//FASTIO
// 	///*
//  #ifndef ONLINE_JUDGE
//  	freopen("in.txt", "r", stdin);
//  	freopen("out.txt", "w", stdout);
//  	freopen("error.txt", "w", stderr);
//  #endif
// //*/
	ll n, k, q;
	cin >> n >> k >> q;
	if(k > q){
		for(int i = 1; i <= n; i++)
			printf("Yes\n");
		return 0;
	}
	for (int i = 0; i < q; i++) {
		ll x;
		cin >> x;
		mp[x]++;
	}
	for (int i = 1; i <= n; i++) {
		dbg(k - (q - mp[i]));
		if (k - (q - mp[i]) > 0)printf("Yes\n");
		else printf("No\n");
	}
	return 0;
}
//  [c]
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#define printArray(array, alen) \
    do{ \
        for(int i = 0; i < alen; i++){ \
            fprintf(stderr, "%d ", array[i]); \
        } \
        fprintf(stderr, "\n"); \
    }while(0)
int main() {
    int n, k, q;
    scanf("%d %d %d", &n, &k, &q);
    int a[q];
    for (int i = 0; i < q; i++) {
        scanf("%d", &a[i]);
    }
    
    int cnt[n];
    for(int i = 0; i < n; i++) {
        cnt[i] = 0;
    }
    printArray(cnt, n);

    for (int i = 0; i < q; i++ ) {
        cnt[a[i] - 1]++;
    }
    printArray(cnt, n);

    for(int i = 0; i < n; i++) {
        if((k - (q - cnt[i])) > 0) {
            printf("Yes\n");
        }else {
            printf("No\n");
        }
    }
    return 0;
}
//  [c]
#include <stdio.h>
int main(void){
    int n, k, q, p[100000+5];
    scanf("%d %d %d", &n, &k, &q);
    for(int i=0; i<n; i++)p[i]=k;
    for(int i=0; i<q; i++){
        int a;
        scanf("%d", &a);
        p[a-1]++;
    }
    for(int i=0; i<n; i++){
        if(p[i]-q>0)printf("Yes\n");
        else printf("No\n");
    }
}
//  [c]
#include <stdio.h>
int main(void){
    int n, k, q, p[100000+5]={0};
    scanf("%d %d %d", &n, &k, &q);
    for(int i=0; i<q; i++){
        int a;
        scanf("%d", &a);
        p[a-1]++;
    }
    for(int i=0; i<n; i++){
        if(p[i]-(q-k)>0)printf("Yes\n");
        else printf("No\n");
    }
    return 0;
}
//  [javascript]
const main = (input) => {
  var N = input[0].split(" ")[0];
  var K = input[0].split(" ")[1];
  var Q = input[0].split(" ")[2];

  var map = {};
  for(var i=1;i<=Q;i++){
    var x = input[i];
    map[x] = (map[x]||0) + 1;
  }
  for(var i=1;i<=N;i++){
    console.log(Q-(map[i]||0)<K?"Yes":"No");
  }
}
main(require('fs').readFileSync('/dev/stdin', 'UTF-8').trim().split("\n"));
//  [javascript]
'use strict';

const input = require('fs').readFileSync('/dev/stdin', 'utf8').trim().split('\n');
let Nums = input.shift();
let N = Nums.split(" ")[0];
let K = Nums.split(" ")[1];
let Q = Nums.split(" ")[2];
let Aarr = input.map(x => x*1);
// この人数分だけyesの数は出るっぽい
let diff = Q - K;
if(diff < 0){
  for(let i = 1; i <= N; i++){
     console.log("Yes");
  }
  return;
}

// 出てくる頻度順に並べる？
// これは借り物のロジック
// 頻度のオブジェクト
let obj = {};
for (let i = 0, j = Aarr.length; i < j; i++) {
   obj[Aarr[i]] = (obj[Aarr[i]] || 0) + 1;
}

// 多分出てきたvalueがdiffより大きかったらそれは勝ち残れるっぽい
for(let i = 1; i <= N; i++){
	if(obj[i]*1 > diff){
    	console.log("Yes");
    } else {
    	console.log("No");
    }
}
//  [javascript]
function Main(input){
    input = input.split('\n');

    tmp = input[0].split(" ");
    tmp= tmp.map(Number);
    const sankasha_N = tmp[0];
    const initPoints_K = tmp[1];
    const questions_Q = tmp[2];
    //index 0の削除
    input.shift();
    //空要素削除
    input= input.filter(v => v);
    //数値化
    input = input.map(Number);

    //メンバの持ち点配列
    var memPoints = new Array(sankasha_N).fill(initPoints_K);

    //正解数頻度分析
    var counts =[];
    for(var i=0;i< input.length;i++){
        var key = input[i];
        counts[key] = (counts[key])? counts[key] + 1 : 1;
    }
  	//index 0の削除
    counts.shift();

    //結果合否
    var tmpPoints = 0;
    memPoints.map((v,i) => {
        tmpPoints = 0;        
        counts[i] = (counts[i])? counts[i]:0;
        tmpPoints = v - (questions_Q - counts[i]);
        if(0 < tmpPoints){
            console.log('Yes');
        }else{
            console.log('No');
        }
    });
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [go]
package main

import "fmt"

func main() {
	var n, k, q int
	fmt.Scan(&n, &k, &q)

	// ans := make([]int , n)
	scores := make([]int, n)
	for i := 0; i < n; i++ {
		scores[i] = k - q
	}
	corCnt:= map[int]int{}
	for i := 0; i < q ; i++ {
		var a int
		fmt.Scan(&a)
		corCnt[a-1]++
	}


	for k, v := range corCnt {
		scores[k] += v
	}
	for _, v := range scores {
		if v > 0 {
			fmt.Println("Yes")
			continue
		}
		fmt.Println("No")
	}
}
//  [go]
package main

import "fmt"

func main() {
	var n, k, q, i int
	fmt.Scan(&n, &k, &q)
	scores := make(map[int]int)
	// create scores map
	for i = 1; i <= n; i++ {
		scores[i] = 0
	}
	for index := 0; index < q; index++ {
		fmt.Scan(&i)
		scores[i]++
	}
	for i = 1; i <= n; i++ {
		score := scores[i]
		score = k - q + score
		if score > 0 {
			fmt.Println("Yes")
		} else {
			fmt.Println("No")
		}
	}
}
//  [go]
package main

import (
	"fmt"
)

func main() {

	var N, K, Q int
	fmt.Scanf("%d %d %d", &N, &K, &Q)

	point := make(map[int]int, N)

	var A int
	for i := 0; i < Q; i++ {
		fmt.Scanf("%d", &A)
		point[A]++
	}

	for i := 0; i < N; i++ {
		if (K + point[i+1] - Q) > 0 {
			fmt.Println("Yes")
		} else {
			fmt.Println("No")
		}
	}
}
//  [ruby]
N, K, Q = gets.split(" ").map(&:to_i)
points = Array.new(N, K)

Q.times do |i|
    A = gets.to_i
    points[A - 1] += 1
end

points.each do |p|
    p -= Q
    if p <= 0
        puts "No"
    else
        puts "Yes"
    end
end
//  [ruby]
# your code goes here
N, K, Q = gets.split.map(&:to_i)
As = Q.times.map{gets.to_i}

ans = Array.new(N, 0)

for A in As do
  ans[A-1] += 1
end

for i in 0...N do
  if i != N-1 then
	  puts (Q - ans[i] >= K) ? "No" : "Yes"
  else
  	  print (Q - ans[i] >= K) ? "No" : "Yes"
  end
end
//  [ruby]
N, K, Q = gets.chomp.split.map(&:to_i)

pys = []
Q.times do
  pys << gets.split.map(&:to_i)
end

i = 1

has = pys.each_with_object(Hash.new(0)){|v,o| o[v]+=1}


while i < N + 1
	if has[[i]]+K-Q > 0
	  puts "Yes"
    else
      puts "No"
    end
    i += 1
end
//  [rust]
use itertools::Itertools;
use proconio::input;
use proconio::marker::{Chars, Usize1};
use std::cmp::*;
use std::collections::*;
use std::iter::Iterator;

#[allow(unused_macros)]
macro_rules! max {
    ($x:expr) => {
      $x
    };
    ($x:expr, $($xs:tt)+) => {
      max($x,max!($($xs)+))
    };
  }

#[allow(unused_macros)]
macro_rules! min {
    ($x:expr) => {
      $x
    };
    ($x:expr, $($xs:tt)+) => {
      min($x,min!($($xs)+))
    };
  }

#[allow(unused_macros)]
macro_rules! debug {
    ($($a:expr),*) => {
        eprintln!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);
    }
}

fn main() {
  input! {
  n: usize,
  k: i64,
  q: i64,
  }

  let mut vec = vec![0; n];

  for _ in 0..q {
    input! {
      a: i64,
    }
    vec[(a - 1) as usize] += 1;
  }

  debug!(vec);

  for i in vec {
    if k - q + i <= 0 {
      println!("No")
    } else {
      println!("Yes")
    }
  }

}
//  [swift]
let input = readLine()!.characters.split(" ").map{Int(String($0))!}
let (N, K, Q) = (input[0], input[1], input[2])
var cnt = (0..<N).flatMap{_ in [0]}
for _ in 0..<Q {
  cnt[Int(readLine()!)!-1] += 1
}
cnt.forEach{print($0>Q-K ?"Yes":"No")}
//  [swift]
let a = readLine()!.characters.split{$0 == " "}.map{ Int(String($0))! }
let n = a[0]
let k = a[1]
let q = a[2]

var answers = [Int]()

for counter in 0..<q {
  answers.append(Int(readLine()!)!)
}

if q < k {
  for index in 0..<n {
    print("Yes")
  }
} else {
  var ret = Array(count: n, repeatedValue: "No")
  var dict = [Int:Int]()

  for ans in answers {
    if dict[ans] == nil {
      dict[ans] = 1
    } else {
      dict[ans] = dict[ans]! + 1
    }
  }
  
  for (key,v) in dict {
    //print(key,v,q-v,k)
    if q - v < k {
      ret[key - 1] = "Yes"
    }
  }
  
  for score in ret {
    print(score)
  }
}
//  [typescript]
const input=require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/);let input_i=-1;const tn=():number=>{input_i++;return Number(input[input_i])};const tnn=(n:number):number[]=>{const a=[];for(let i=0;i<n;i++){a.push(tn())}return a};const ts=():string=>{input_i++;return String(input[input_i])};const tss=(n:number):string[]=>{const a=[];for(let i=0;i<n;i++){a.push(ts())}return a};const to=(...arg)=>{console.log(...arg)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const floor=(a)=>{return Math.floor(a)};const asc=(ar:number[])=>{return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{return ar.sort((a,b)=>{return b-a})};const sw=(a,arr:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<arr.length-1;i+=2){if(eval(a+op+arr[i])){return arr[i+1]}}return arr[arr.length-1]};const near=(n:number,arr:number[]):number=>{let ne=arr[0],ni=0;for(let i=1;i<arr.length;i++){if(Math.abs(n-ne)>Math.abs(n-arr[i])){ne=arr[i];ni=i}}return ni};const deduplicate=(a):any[]=>{return Array.from(new Set(a))};
const main=()=>{
  let [n,k,q]=tnn(3)
  let ch=new Array(n)
  ch.fill(k)
  for(let i=0;i<q;i++){
    let win=tn()-1
    ch[win]++
  }
  for(let i=0;i<n;i++){
    to(ch[i]-q>0?'Yes':'No')
  }
}
main()
//  [typescript]
function main(input) {
    const [n,k,q] = input.split('\n')[0].split(' ').map(v => parseInt(v, 10));
    const participants = [...Array(n)].fill(k - q);
    let questions = input.split('\n');
    questions.shift();
    questions.forEach(q => participants[q-1]++);
    participants.forEach(v => v > 0 ? console.log("Yes") : console.log("No"));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [python]
import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7



A, B = list(map(int, sys.stdin.readline().split()))
a = A - B * 2
print(max(a, 0))
//  [python]
import numpy as np
import sys
a,b = map(int,input().split())
c = b*2
print(a-c if a-c>=0 else 0)
//  [python]
import numpy as np
import math
import sys
sys.setrecursionlimit(10000000)

def main():
    A, B = map(int, input().split())
    print(max(0, A - 2 * B))

if __name__ == '__main__':
    main()
//  [java]
import java.util.Scanner;
import java.util.stream.Stream;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str  = sc.nextLine();
        String[] astr = str.split(" "); //状況に合わせて
        Boolean flag  = true;
        int[] in_data = Stream.of(astr).mapToInt(x->{
            try{
                return Integer.parseInt(x);
            }
            catch(Exception e){
                e.printStackTrace();
            }
            return 0;
        }).toArray();
        sc.close();

        int a= in_data[0];
        int b = in_data[1];
        int ans = a - b*2;
        if(ans > 0 ){
            System.out.println(ans);
        }else{
            System.out.println(0);
        }
    }

}
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.regex.Pattern;

public class Main {
    public void solve(BufferedReader stdin, PrintWriter stdout) throws NumberFormatException, IOException {
        int[] line = Pattern.compile(" ").splitAsStream(stdin.readLine()).mapToInt(Integer::parseInt).toArray();
        int a = line[0];
        int b = line[1];
        stdout.println(Math.max(0, a - b - b));
    }

    public static void main(String[] args) throws NumberFormatException, IOException {
        BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter stdout = new PrintWriter(System.out, false);
        new Main().solve(stdin, stdout);
        stdout.flush();
    }
}
//  [cpp]
#include <bits/stdc++.h>
#include <boost/foreach.hpp>
using namespace std;
#define pi 2*asin(1.0)
#define MAX 10000000
#define MOD 1000000007
#define _GLIBCXX_DEBUG
 
vector<long> fac(MAX);
vector<long> finv(MAX);
vector<long> inv(MAX);
vector<long> Primelist;
//template functions
/////////////////////////
void Prinit(){
long PR=10000001;
vector<long> P(PR,0);
for(long i=2;i*i<PR;i++){
    if(P.at(i)==0){
        long j=i;
      j+=i;
        while(j<PR){
            P.at(j)=1;
             j+=i;         
        }
    }
}

for(long i=2;i*i<PR;i++){//Primelist.size()=446
    if(P.at(i)==0){
        Primelist.push_back(i);
    }
}
}

void Cominit(){
  fac.at(0)=fac.at(1)=1;
  finv.at(0)=finv.at(1)=1;
  inv.at(1)=1;
  for(long i=2;i<MAX;i++){
      fac.at(i)=(fac.at(i-1)*i)%MOD;
      inv.at(i)=MOD-inv.at(MOD%i)*(MOD/i)%MOD;
      finv.at(i)=finv.at(i-1)*inv.at(i)%MOD;
  }
}

long facComb(long N,long M){// nCm%
if(N<M) return 0;
if(N<0||M<0) return 0;
return fac.at(N)*(finv.at(M)*finv.at(N-M)%MOD)%MOD;
}

long Comb(long N,long M){// nCm
long ans=1;
for(long i=N;i>N-M;i--){
    ans=ans*i;
}
for(long i=M;i>0;i--){
    ans=ans/i;
}
return ans;
}

long Perm(long N,long M){// nPm
long ans=1;
for(long i=N;i>N-M;i--){
    ans=ans*i;
}
return ans;
}

long GCM(long A,long B){
            long W,r;
    if(A<B){

        W=B;
        B=A;
        A=W;
    }
    while(A%B!=0){
        r=A%B;
        A=B;
        B=r;
    }
    return B;
}
long LCM(long A,long B){
    return (A*B)/GCM(A,B);
}

long upDiv(long a,long b){
  return (a+b-1)/b;
}

long strtolong(string str){
istringstream ss;
ss=istringstream(str);
long num;
ss>>num;
return num;
}

long chartolong(char ch){
long num;
num=ch-'0';
return num;
}

string longtostr(long N){
    string str;
    str=to_string(N);
    return str;
}









/////////////////////////


//Answer


int main() {
Prinit();
long A,B;
cin>>A>>B;
if(A<2*B){
    cout<<0<<endl;
}else{
    cout<<A-2*B<<endl;
}

}
//  [c]
#include <stdio.h>
typedef long long ll;

int main(){
    int a,b;
    scanf("%d %d",&a,&b);
    int x=a-2*b;
    if(x<=0)x=0;
    printf("%d",x);
}
//  [c]
    #include <stdio.h>
    #include <string.h>

    int main(void)
    {
        int a = 0,b = 0,c = 0;
        scanf("%d %d",&a,&b);
        
        c = (a - (b*2));
        
        if(c > 0)
            {printf("%d\n",c);}
        else
            {printf("0\n");}
        return 0;
    }
//  [c]
#include<stdio.h>
int main()
{
    int A,B,s;
    scanf("%d %d",&A,&B);
    s=A-(2*B);
    if(s<0)
    {
        printf("0\n");
    }
    else
        printf("%d\n",s);
    return 0;

}
//  [javascript]
'use strict';

const testcase = null;

function main(input) {
    const a = parseInt(input.shift());
    const b = parseInt(input.shift());
    console.log(Math.max(0, a - b * 2));
}

if (process.argv[1] == __filename) {
    const input = testcase
        || require('fs')
            .readFileSync('/dev/stdin', 'utf-8');
    main(input.split(/\s/));
}
//  [javascript]
"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const A = parseInt(arg[0].split(" ")[0]);
    const B = parseInt(arg[0].split(" ")[1]);
    
    console.log(A - (B * 2) < 0 ? 0 : A - (B * 2) );
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function Main(arg) {
 
    var A = arg.split(" ")[0]-0;
    var B = arg.split(" ")[1]-0;
 
    var ans = 0;

    if (A - 2 * B > 0) {
        console.log(A - 2 * B);
    }
    else {
        console.log(0);
    }


    return;
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [go]
package main

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

var (
	A, B, answer int
)

func readVariables() {
	A, B = nextInt(), nextInt()
}

func main() {
	readVariables()
	answer = MaxInt(0, A-2*B)
	fmt.Println(answer)
}

/* 以下、テンプレート*/

var scanner *bufio.Scanner

func init() {
	Max := 10010010
	scanner = bufio.NewScanner(os.Stdin)
	scanner.Buffer(make([]byte, 0, Max), Max)
	scanner.Split(bufio.ScanWords)
}

//nextInt converts next token from stdin and returns integer value.
//nextInt panics when conversion into an integer fails.
func nextInt() int {
	if !scanner.Scan() {
		panic("No more token.")
	}
	num, err := strconv.Atoi(scanner.Text())
	if err != nil {
		panic("nextInt(): cannot convert to int: " + scanner.Text())
	}
	return num
}

func nextStr() string {
	if !scanner.Scan() {
		panic("No more token.")
	}
	return scanner.Text()
}

// MinInt は、2つの整数を受け取り、最小値を返します。
func MinInt(x, y int) int {
	if x < y {
		return x
	} else {
		return y
	}
}

//MaxInt は、2つの整数を受け取り、最大値を返します。
func MaxInt(x, y int) int {
	if x < y {
		return y
	} else {
		return x
	}
}

//AbsInt は、整数の絶対値を返します。
func AbsInt(x int) int {
	if x < 0 {
		return -x
	}
	return x
}

//ModPow は整数の累乗関数で、剰余もサポートします。
//base^exponentの値をmoduleで割った余りを返します。
//moduloが1以下の場合には、剰余演算をしません。
//baseが負の値である場合には、返す値が負になることがあります。
func ModPow(base, exponent, modulo int) (result int) {
	result = 1
	for exponent > 0 {
		if exponent%2 == 1 {
			result *= base
			if modulo > 1 {
				result %= modulo
			}
		}
		base *= base
		if modulo > 1 {
			base %= modulo
		}
		exponent /= 2
	}
	return
}

//Gcd は、引数の整数全ての最大公約数を返します。
func Gcd(vals ...int) (result int) {
	if len(vals) == 0 {
		return
	}
	result = vals[0]
	for i := 1; i < len(vals); i++ {
		result = gcd(result, vals[i])
	}
	return
}

func gcd(x, y int) int {
	x, y = AbsInt(x), AbsInt(y)
	for y > 0 {
		x, y = y, x%y
	}
	return x
}

//Lcm は、与えられた整数の最小公倍数を返します。
func Lcm(vals ...int) (result int) {
	if len(vals) == 0 {
		return
	}
	result = vals[0]
	for i := 1; i < len(vals); i++ {
		result = lcm(result, vals[i])
	}
	return
}

func lcm(x, y int) int {
	return x * y / gcd(x, y)
}
//  [go]
package main

import "fmt"

func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}
func main() {
	var a, b int

	fmt.Scan(&a, &b)
	fmt.Println(max(a-2*b, 0))
}
//  [go]
package main

import "fmt"

func main() {
	var a, b int
	fmt.Scan(&a, &b)
	ret := b * 2
	if a > ret {
		fmt.Println(a - ret)
	} else {
		fmt.Println(0)
	}
}
//  [ruby]
a,b = gets.chomp.split(' ').map(&:to_i)
if a-b*2 < 0
  puts 0
else
  puts a-b*2
end
//  [ruby]
#!/usr/bin/env ruby

require 'set'

class Hash
  def push(key, value)
    self[key] = [] if self[key] == nil
    self[key].push(value)
  end
end

class Array
  def lower_bound(value)
    left = -1;
    right = self.length;
    while left + 1 < right
      mid = left + (right - left) / 2;
      if self[mid] >= value
        right = mid
      else
        left = mid
      end
    end
    right
  end

  def unique
    res = [self.first]
    each_cons(2) do |a, b|
      if a != b
        res.push(b)
      end
    end
    res
  end
end

def get_ints
  gets.chomp.split.map(&:to_i)
end

def get_ints_minus_one
  get_ints.map { |x| x - 1 }
end

def get_int
  gets.chomp.to_i
end

A, B = get_ints

c = A - 2 * B
c = 0 if c < 0

puts c
//  [ruby]
a, b = gets.chomp.split.map(&:to_i)
puts [a-b*2, 0].max
//  [rust]
#![allow(non_snake_case)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};
    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };
    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };
    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };
    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };
    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input!(
        a: isize,
        b: isize,
    );
    let diff = a - b*2;
    if diff < 0 {
        println!("0");
    } else {
        println!("{}", diff);
        
    }
}
//  [rust]
use proconio::input;
use proconio::marker::Chars;
fn main() {
    input!{
        n:i32,m:i32
    };
    println!("{}", (n-2*m).max(0));
}
//  [swift]
func LI() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func I() -> Int {
    return Int(readLine()!)!
}

func S() -> String {
    return readLine()!
}

let line = LI()
print(max(0,line[0]-2*line[1]))
//  [swift]
func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}
 
let num=readInts()
let a=num[0]
let b=num[1]
let ans=a-2*b
if ans<0{
  print(0)
}else{
  print(ans)
}
//  [swift]
let input = readLine()!.characters.split(" ").map{Int(String($0))!}
print(max(input[0]-input[1]*2,0))
//  [typescript]
// 入力処理
const lines = [];
const reader = require('readline').createInterface({
    input: process.stdin,
    output: process.stdout
});

reader.on('line', function (line) {
    lines.push(line);
});

reader.on('close', function () {
    // 入力値
    const input = (lines[0] as string).split(" ");

    // 窓の幅とカーテンの幅
    const a = +input[0];
    const b = +input[1];

    // カーテンで隠されていない部分の幅
    const res = a - (b * 2);

    if (res > 0) {
        console.log(res);
    } else {
        console.log(0);
    }
})
//  [typescript]
import * as fs from 'fs';

const input = fs.readFileSync("/dev/stdin", "utf8").split(" ");
const a = +input[0];
const b = +input[1];

const res = a - b * 2;

if (res > 0) {
    console.log(res);
} else {
    console.log(0);
}
//  [typescript]
const lines=[];
const reader = require('readline').createInterface({
    input: process.stdin,
    output: process.stdout
});

reader.on('line', function (line) {
  lines.push(line);
});
reader.on('close', function () {
    const input = (lines[0] as string).split(" ");
    const a = +input[0];
    const b = +input[1];

    const res = a - b * 2;
    
    if (res > 0) {
        console.log(res);
    } else {
        console.log(0);
    }
});
//  [python]
import math,heapq,collections,sys,numpy

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()

a,b,c = LI()
if a == b:
    print(c)
elif b == c:
    print(a)
elif a == c:
    print(b)
//  [python]
import numpy as np

A, B, C = (list(map(int, input().split())))
if(A == B):
  print(C)
elif(A == C):
  print(B)
else:
  print(A)
//  [python]
# -*- coding: utf-8 -*-
import sys, copy, math, itertools
from copy import *
from collections import deque
import numpy as np
from heapq import *
from bisect import *
import scipy as sp
from scipy import special, signal, ifft
from scipy.fftpack import fft
#from scipy.optimize import linprog		# AtCoderでは使えず

A, B, C = list( map(int, input().split() ) )

if A==B: print(C)
if B==C: print(A)
if C==A: print(B)
//  [java]
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.stream.IntStream;

public class Main {

	private static final int N = 3;

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			Map<Integer, Integer> map = new HashMap<>();
			IntStream.range(0, N).forEach(i -> {
				int a = scanner.nextInt();
				map.put(a, map.getOrDefault(a, 0) + 1);
			});
			System.out
					.println(map.entrySet().stream().filter(entry -> entry.getValue() == 1).findFirst().get().getKey());
		}
	}
}
//  [java]

public class Main {
  private static void solve() {
    int a = ni();
    int b = ni();
    int c = ni();
    
    if (a == b) {
      System.out.println(c);
    } else if (a == c) {
      System.out.println(b);
    } else {
      System.out.println(a);
    }
  }

  public static void main(String[] args) {
    new Thread(null, new Runnable() {
      @Override
      public void run() {
        long start = System.currentTimeMillis();
        String debug = args.length > 0 ? args[0] : null;
        if (debug != null) {
          try {
            is = java.nio.file.Files.newInputStream(java.nio.file.Paths.get(debug));
          } catch (Exception e) {
            throw new RuntimeException(e);
          }
        }
        reader = new java.io.BufferedReader(new java.io.InputStreamReader(is), 32768);
        solve();
        out.flush();
        tr((System.currentTimeMillis() - start) + "ms");
      }
    }, "", 64000000).start();
  }

  private static java.io.InputStream is = System.in;
  private static java.io.PrintWriter out = new java.io.PrintWriter(System.out);
  private static java.util.StringTokenizer tokenizer = null;
  private static java.io.BufferedReader reader;

  public static String next() {
    while (tokenizer == null || !tokenizer.hasMoreTokens()) {
      try {
        tokenizer = new java.util.StringTokenizer(reader.readLine());
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
    }
    return tokenizer.nextToken();
  }

  private static double nd() {
    return Double.parseDouble(next());
  }

  private static long nl() {
    return Long.parseLong(next());
  }

  private static int[] na(int n) {
    int[] a = new int[n];
    for (int i = 0; i < n; i++)
      a[i] = ni();
    return a;
  }

  private static char[] ns() {
    return next().toCharArray();
  }

  private static long[] nal(int n) {
    long[] a = new long[n];
    for (int i = 0; i < n; i++)
      a[i] = nl();
    return a;
  }

  private static int[][] ntable(int n, int m) {
    int[][] table = new int[n][m];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        table[i][j] = ni();
      }
    }
    return table;
  }

  private static int[][] nlist(int n, int m) {
    int[][] table = new int[m][n];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        table[j][i] = ni();
      }
    }
    return table;
  }

  private static int ni() {
    return Integer.parseInt(next());
  }

  private static void tr(Object... o) {
    if (is != System.in)
      System.out.println(java.util.Arrays.deepToString(o));
  }
}
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {


    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str = br.readLine().split(" ");
        int a = Integer.parseInt(str[0]);
        int b = Integer.parseInt(str[1]);
        int c = Integer.parseInt(str[2]);

        if(a == b){
            System.out.println(c);
        } else if(b == c){
            System.out.println(a);
        } else {
            System.out.println(b);
        }
    }
}
//  [cpp]
#include<iostream>

using namespace std;

int main()
{
    int a,b,c;
    cin>>a>>b>>c;
    if(a==b) { cout << c << endl;}
    else if(a==c) { cout << b << endl;}
    else { cout << a << endl;}
    return 0;
}
//  [cpp]
#include <iostream>
using namespace std;
#include<string.h>
#include<set>
#include<stdio.h>
#include<math.h>
#include<queue>
#include<map>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<cstring>
#include <cstdio>
#include <cstdlib>
#include<stack>
#include<vector>
int main()
{
    int a,b,c;
    cin>>a>>b>>c;
    if(a==b)
        cout<<c<<endl;
    else if(b==c)
        cout<<a<<endl;
    else
        cout<<b<<endl;
    return 0;
}
//  [cpp]
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include<random>
#include<math.h>
#include<limits.h>
#include<iterator>
#include<queue>
#include<functional>
#define rep(i,a) for(int i=0;i<a;i++)
#define nrep(i,a,b) for(int i=a;i<b;i++)
#define mrep(i,a) for(int i=a;i>=0;i--)
#define ll long long
#define vl vector<ll> 
#define vvl vector<vector<ll> > 
#define vb vector<bool> 
#define vvb vector<vector<bool> > 
#define INF 11234567890123456789
using namespace std;

int main(){
	ll a, b, c; cin >> a >> b >> c;
	if (a == b) cout << c << endl;
	else if (a == c) cout << b << endl;
	else if (b == c) cout << a << endl;
	return 0;
}
//  [c]
#include<stdio.h>
int main(){
  int a,b,c;
  scanf("%d%d%d",&a,&b,&c);
  printf("%d",a==b?c:a==c?b:a);
}
//  [c]
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <math.h>

int main(void){

    int A, B, C;

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

    if(A == B){
        printf("%d\n", C);
    }else if(B == C){
        printf("%d\n", A);
    }else{
        printf("%d\n", B);
    }

    return 0;
}
//  [c]
#include <stdio.h>

int main(){
  int A,B,C,D;
  scanf("%d %d %d",&A,&B,&C);
  if(A==B) D=C;
  else if(A==C) D=B;
  else D=A;
  printf("%d\n",D);
  return 0;
}
//  [javascript]
process.stdin.resume();
process.stdin.setEncoding('utf8');
var input_string = '';

process.stdin.on('data', function (chunk) {
    input_string += chunk;
});
const space_input = function (line) {
    var arr = line.replace(/(^\s+)|(\s+$)/g, "").split(" ");
    for (var i = 0; i < arr.length; ++i) {
        arr[i] = +arr[i];
    }
    return arr;
};
const space_input_char = function (line) {
    var arr = line.replace(/(^\s+)|(\s+$)/g, "").split(" ");
    for (var i = 0; i < arr.length; ++i) {
        arr[i] = arr[i];
    }
    return arr;
};

process.stdin.on('end', function () {
    const lines = input_string.split('\n');
    const abc = space_input(lines[0]);
    if(abc[0]==abc[2]){
        console.log(abc[1])
    }
    if(abc[0]==abc[1]){
        console.log(abc[2])
    }
    if(abc[1]==abc[2]){
        console.log(abc[0])
    }
    
});
//  [javascript]
function getLineByParam( param ){
  var ret;
  for ( var i=0; i<param[0].length; i++ ) {
    if ( "\n" == param[0].charAt( i ) ) {
      ret = param[0].slice( 0, i );
      param[0] = param[0].slice( ret.length+1 );
      return ret;
    }
  }
  ret = param[0];
  param[0]="";
  return ret;
}

function Main(input) {
  input = [input];
  var tmp = getLineByParam(input).split(" ");
  var A = parseInt( tmp[0] );
  var B = parseInt( tmp[1] );
  var C = parseInt( tmp[2] );
  if ( A === B ) {
    console.log( C );
  }
  else if ( A === C ) {
    console.log( B );
  }
  else if ( B === C ) {
    console.log( A );
  }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
const main = input => {
  const [A, B, C] = input.trim().split(' ').map(x => parseInt(x))
  if (A === B) {
    console.log(C)
  } else {
    if (A === C) {
      console.log(B)
    } else {
      console.log(A)
    }
  }
}
// 標準入力
main(require("fs").readFileSync("/dev/stdin", "utf8"))
//  [go]
package main

// Solution for https://atcoder.jp/contests/abc075/tasks/abc075_a

import (
	"bufio"
	"fmt"
	"io"
	"os"
)

type contest struct {
	in  io.Reader
	out io.Writer
}

func (con *contest) Scan(a ...interface{}) (int, error) {
	return fmt.Fscan(con.in, a...)
}
func (con *contest) Scanln(a ...interface{}) (int, error) {
	return fmt.Fscanln(con.in, a...)
}
func (con *contest) Scanf(f string, a ...interface{}) (int, error) {
	return fmt.Fscanf(con.in, f, a...)
}
func (con *contest) Print(a ...interface{}) (int, error) {
	return fmt.Fprint(con.out, a...)
}
func (con *contest) Println(a ...interface{}) (int, error) {
	return fmt.Fprintln(con.out, a...)
}
func (con *contest) Printf(f string, a ...interface{}) (int, error) {
	return fmt.Fprintf(con.out, f, a...)
}
func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	con := &contest{in: in, out: out}
	con.main()
}

func (con *contest) main() error {
	var a, b, c int
	con.Scan(&a, &b, &c)
	x := 0
	if a == b {
		x = c
	}
	if b == c {
		x = a
	}
	if c == a {
		x = b
	}
	con.Println(x)
	return nil
}
//  [go]
package main

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

func out(x ...interface{}) {
	fmt.Println(x...)
}

var sc = bufio.NewScanner(os.Stdin)

func getInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func getInts(N int) []int {
	ret := make([]int, N)
	for i := 0; i < N; i++ {
		ret[i] = getInt()
	}
	return ret
}

func getString() string {
	sc.Scan()
	return sc.Text()
}

// min, max, asub, absなど基本関数
func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func asub(a, b int) int {
	if a > b {
		return a - b
	}
	return b - a
}

func abs(a int) int {
	if a >= 0 {
		return a
	}
	return -a
}

func lowerBound(a []int, x int) int {
	idx := sort.Search(len(a), func(i int) bool {
		return a[i] >= x
	})
	return idx
}

func upperBound(a []int, x int) int {
	idx := sort.Search(len(a), func(i int) bool {
		return a[i] > x
	})
	return idx
}

func main() {
	sc.Split(bufio.ScanWords)
	a := getInts(3)
	sort.Ints(a)
	if a[0] == a[1] {
		out(a[2])
		return
	}
	out(a[0])
}
//  [ruby]
require 'prime'
require 'set'
require 'tsort'
include Math
ALP = ('a'..'z').to_a
INF = 0xffffffffffffffff
def max(a,b);              a > b ? a : b                              end
def min(a,b);              a < b ?  a : b                             end
def swap(a,b);             a, b = b, a                                end
def gif;                   gets.to_i                                  end
def gff;                   gets.to_f                                  end
def gsf;                   gets.chomp                                 end
def gi;                    gets.split.map(&:to_i)                     end
def gf;                    gets.split.map(&:to_f)                     end
def gs;                    gets.chomp.split.map(&:to_s)               end
def gc;                    gets.chomp.split('')                       end
def pr(num);               num.prime_division                         end
def pr?(num);              Prime.prime?(num)                          end
def digit(num);            num.to_s.length                            end
def array(s,ini=nil);      Array.new(s){ini}                          end
def darray(s1,s2,ini=nil); Array.new(s1){Array.new(s2){ini}}          end
def rep(num);              num.times{|i|yield(i)}                     end
def repl(st,en,n=1);       st.step(en,n){|i|yield(i)}                 end

a,b,c = gi

puts case
when a == b
  c
when a == c
  b
when b == c
  a
end
//  [ruby]
n = gets.chomp.split(" ").map(&:to_i)
hash = Hash.new(0)
n.each do |i|
    hash[i] += 1
end
hash.each do |a,b|
    if b == 1
        puts a
    end
end
//  [ruby]
a = gets.split.map(&:to_i).to_a
puts a.detect { |e| a.count(e) == 1 }
//  [rust]
#![allow(non_snake_case)]
#![allow(unused_imports)]
#![allow(dead_code)]

use proconio::{input, fastout};
use proconio::marker::*;
use whiteread::parse_line;
use std::collections::*;
use num::*;
use num_traits::*;
use superslice::*;
use std::ops::*;

use itertools::Itertools;
use itertools_num::ItertoolsNum;


#[fastout]
fn solve() {
    const MOD: usize = 1_000_000_007;
    const INF: usize = std::usize::MAX;
    
    input!{
        v: [isize; 3],
    }

    let mut ans = 0;
    for &i in v.iter() {
        if v.iter().filter(|x| **x == i).count() == 1 {
            ans = i
        }
    }

    println!("{}", ans);
}

fn main() {
    solve()
}

#[cfg(test)]
mod test {
    use super::solve;
}
//  [rust]
#[allow(unused_macros)]
macro_rules ! read_value {($ next : expr , ($ ($ t : tt ) ,* ) ) => {($ (read_value ! ($ next , $ t ) ) ,* ) } ; ($ next : expr , [$ t : tt ; $ len : expr ] ) => {(0 ..$ len ) . map (| _ | read_value ! ($ next , $ t ) ) . collect ::< Vec < _ >> () } ; ($ next : expr , chars ) => {read_value ! ($ next , String ) . chars () . collect ::< Vec < char >> () } ; ($ next : expr , usize1 ) => {read_value ! ($ next , usize ) - 1 } ; ($ next : expr , $ t : ty ) => {$ next () . parse ::<$ t > () . expect ("Parse error" ) } ; }
#[allow(unused_macros)]
macro_rules ! input_inner {($ next : expr ) => {} ; ($ next : expr , ) => {} ; ($ next : expr , $ var : ident : $ t : tt $ ($ r : tt ) * ) => {let $ var = read_value ! ($ next , $ t ) ; input_inner ! {$ next $ ($ r ) * } } ; }
#[allow(unused_macros)]
macro_rules ! input {(source = $ s : expr , $ ($ r : tt ) * ) => {let mut iter = $ s . split_whitespace () ; let mut next = || {iter . next () . unwrap () } ; input_inner ! {next , $ ($ r ) * } } ; ($ ($ r : tt ) * ) => {let stdin = std :: io :: stdin () ; let mut bytes = std :: io :: Read :: bytes (std :: io :: BufReader :: new (stdin . lock () ) ) ; let mut next = move || -> String {bytes . by_ref () . map (| r | r . unwrap () as char ) . skip_while (| c | c . is_whitespace () ) . take_while (| c |! c . is_whitespace () ) . collect () } ; input_inner ! {next , $ ($ r ) * } } ; }

fn main() {
    input! {
        a: i32,
        b: i32,
        c: i32,
    }
    if a == b {
        println!("{}", c);
    } else if a == c {
        println!("{}", b);
    } else {
        println!("{}", a);
    }
}
//  [rust]
use std::io::Read;

fn main() {
    let mut buf = String::new();
    std::io::stdin().read_to_string(&mut buf).unwrap();

    let answer = solve(&buf);

    println!("{}", answer);
}

fn solve(input: &str) -> String {
    let mut iterator = input.split_whitespace();

    let a: isize = iterator.next().unwrap().parse().unwrap();
    let b: isize = iterator.next().unwrap().parse().unwrap();
    let c: isize = iterator.next().unwrap().parse().unwrap();

    if a == b {
        return c.to_string();
    }

    if b == c {
        return a.to_string();
    }

    return b.to_string();
}
//  [typescript]
import { readFileSync } from "fs";

const read = () =>
  readFileSync(0, "utf8")
    .split("\n")
    .map((line) => line.split(" "));

const main = (input: string[][]) => {
  const [A, B, C] = input[0].map(Number);

  return A === B ? C : B === C ? A : B;
};

console.log(main(read()));
//  [typescript]
// Try AtCoder
// author: Leonardone @ NEETSDKASU
let buf = '';
process.stdin.setEncoding('utf8');
process.stdin.on('readable', () => {
  let s = process.stdin.read();
  if (s !== null) { buf += s.toString(); }
});
process.stdin.on('end', () => {
  let [a, b, c] = buf.trim().split(' ');
  if (a === b) {
    console.log(c);
  } else if (b === c) {
    console.log(a);
  } else {
    console.log(b);
  }
});
//  [typescript]
const stdin = require('fs').readFileSync('/dev/stdin', 'utf8')

const [a, b, c] = stdin.split('\n')[0].split(' ')

const res = _ => {
  return a === b ? c : b === c ? a : b
}

console.log(res())
//  [python]
# -*- coding: utf-8 -*-

R, G, B, N = map(int, input().split())

counter = 0
for r in range(int(N/R) + 1):
    for g in range(int(N/G) + 1):
        t = R*r + G*g
        if t > N:
            break
        if (N - t) % B == 0:
            counter += 1

print(counter)
//  [python]
R, G, B, N = map(int, input().split())
ans = 0
for i in range(N + 1):
    for j in range(N + 1 - i):
        t = i * R + j * G
        if t <= N and (N - t) % B == 0: ans += 1
print(ans)
//  [python]
r, g, b, n = map(int, input().split())
s_rgb = sorted([r, g, b], reverse=True)
count = 0
for i in range(int(n / s_rgb[0]) + 1)[::-1]:
    for j in range(int((n - s_rgb[0] * i) / s_rgb[1]) + 1)[::-1]:
        tmp = n - s_rgb[0] * i - s_rgb[1] * j
        if (tmp >= 0 and tmp % s_rgb[2] == 0):
            count += 1
print(count)
//  [java]
import java.util.Arrays;
import java.util.Scanner;

class Main {

    public static int R;
    public static int G;
    public static int B;
    public static int N;

    public static int upper_bound(long x, long[] RG) {
        int ok = RG.length;
        int ng = -1;
        while (ok - ng > 1) {
            int mid = (ok + ng) / 2;
            if (RG[mid] <= x) {
                ng = mid;
            } else {
                ok = mid;
            }
        }
        return ok;
    }

    public static int lower_bound(long x, long[] RG) {
        int ok = -1;
        int ng = RG.length;
        while (ng - ok > 1) {
            int mid = (ok + ng) / 2;
            if (RG[mid] < x) {
                ok = mid;
            } else {
                ng = mid;
            }
        }
        return ok;

    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        R = scanner.nextInt();
        G = scanner.nextInt();
        B = scanner.nextInt();
        N = scanner.nextInt();
        long[] RG = new long[((N + R - 1) / R + 1) * ((N + G - 1) / G + 1)];
        int idx = 0;
        for (int r = 0; r <= (N + R - 1) / R; r++) {
            for (int g = 0; g <= (N + G - 1) / G; g++) {
                RG[idx++] = R * r + G * g;
            }
        }
        Arrays.sort(RG);
        long cnt = 0;
        for (int b = 0; b <= (N + B - 1) / B; b++) {
            cnt += upper_bound(N - B * b, RG) - lower_bound(N - B * b, RG) - 1;
        }
        System.out.println(cnt);
    }

}
//  [java]
import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		//一列をintのArrayListに変換
		List<String> l = Arrays.asList(sc.nextLine().split(" "));
		ArrayList<Integer> nl = new ArrayList<Integer>();
		for(String s: l) {
			nl.add(Integer.parseInt(s));
		}
		int r = nl.get(0);
		int g = nl.get(1);
		int b = nl.get(2);
		int n = nl.get(3);
		int k = 0;
		int result = 0;

		for(int i=0;i<=n;i++) {
			for(int j=0;j<=n;j++) {
				if(i==0&&j==0) {
					if((float)n%(float)b==0) {
						result++;
					}
				}else if(i*r+j*g==n) {
					result++;
				}else if(n-(i*r+j*g) > 0 && (float)(n-(i*r+j*g)) % (float)b==0) {
					result++;
				}
			}
		}
		System.out.println(result);
	}
}
//  [java]
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.stream.IntStream;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        int[] input = Arrays.stream(reader.readLine().split(" ")).mapToInt(Integer::parseInt).toArray();
        long cnt = IntStream.range(0, input[3] / input[0] + 1)
                .mapToLong(i -> IntStream.range(0, input[3] / input[1] + 1).filter(j -> {
                    int c = input[3] - i * input[0] - j * input[1];
                    return c >= 0 && c % input[2] == 0;
                }).count())
                .sum();
        System.out.println(cnt);
    }
}