import java.util.*;

public class Main {
  public static void main(String[] args) {
    Main main = new Main();
    main.solve();
    main.show();
  }

  int[] a;
  int ans;

  public Main() {
    Scanner sc = new Scanner(System.in);
    try {
      a = new int[6];
      for (int i = 0; i < 5; i++) {
        int x = sc.nextInt();
        a[x]++;       
      }
    } finally {
      sc.close();
    }
  }
  
  void solve() {
    for (int i = 1; i <= 5; i++) if (a[i] == 0) ans = i;
  }

  void show() {
    System.out.println(ans);
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Main main = new Main();
    main.solve();
    main.show();
  }

  int[] a;
  int ans;

  public Main() {
    Scanner sc = new Scanner(System.in);
    try {
      a = new int[6];
      for (int i = 0; i < 5; i++) {
        int x = sc.nextInt();
        a[x]++;       
      }
    } finally {
      sc.close();
    }
  }
  
  void solve() {
    for (int i = 1; i <= 5; i++) if (a[i] == 0) ans = i;
  }

  void show() {
    System.out.println(ans);
  }
} Main int[] a; a int ans; ans public static void main(String[] args) {
    Main main = new Main();
    main.solve();
    main.show();
  } main {
    Main main = new Main();
    main.solve();
    main.show();
  } Main main = new Main(); main new Main() main.solve() main.solve main main.show() main.show main String[] args args public Main() {
    Scanner sc = new Scanner(System.in);
    try {
      a = new int[6];
      for (int i = 0; i < 5; i++) {
        int x = sc.nextInt();
        a[x]++;       
      }
    } finally {
      sc.close();
    }
  } Main {
    Scanner sc = new Scanner(System.in);
    try {
      a = new int[6];
      for (int i = 0; i < 5; i++) {
        int x = sc.nextInt();
        a[x]++;       
      }
    } finally {
      sc.close();
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) try {
      a = new int[6];
      for (int i = 0; i < 5; i++) {
        int x = sc.nextInt();
        a[x]++;       
      }
    } finally {
      sc.close();
    } {
      sc.close();
    } sc.close() sc.close sc {
      a = new int[6];
      for (int i = 0; i < 5; i++) {
        int x = sc.nextInt();
        a[x]++;       
      }
    } a = new int[6] a new int[6] 6 for (int i = 0; i < 5; i++) {
        int x = sc.nextInt();
        a[x]++;       
      } int i = 0; int i = 0; i 0 i < 5 i 5 i++ i++ i {
        int x = sc.nextInt();
        a[x]++;       
      } {
        int x = sc.nextInt();
        a[x]++;       
      } int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc a[x]++ a[x] a x void solve() {
    for (int i = 1; i <= 5; i++) if (a[i] == 0) ans = i;
  } solve {
    for (int i = 1; i <= 5; i++) if (a[i] == 0) ans = i;
  } for (int i = 1; i <= 5; i++) if (a[i] == 0) ans = i; int i = 1; int i = 1; i 1 i <= 5 i 5 i++ i++ i if (a[i] == 0) ans = i; if (a[i] == 0) ans = i; a[i] == 0 a[i] a i 0 ans = i ans i void show() {
    System.out.println(ans);
  } show {
    System.out.println(ans);
  } System.out.println(ans) System.out.println System.out System System.out ans public class Main {
  public static void main(String[] args) {
    Main main = new Main();
    main.solve();
    main.show();
  }

  int[] a;
  int ans;

  public Main() {
    Scanner sc = new Scanner(System.in);
    try {
      a = new int[6];
      for (int i = 0; i < 5; i++) {
        int x = sc.nextInt();
        a[x]++;       
      }
    } finally {
      sc.close();
    }
  }
  
  void solve() {
    for (int i = 1; i <= 5; i++) if (a[i] == 0) ans = i;
  }

  void show() {
    System.out.println(ans);
  }
} public class Main {
  public static void main(String[] args) {
    Main main = new Main();
    main.solve();
    main.show();
  }

  int[] a;
  int ans;

  public Main() {
    Scanner sc = new Scanner(System.in);
    try {
      a = new int[6];
      for (int i = 0; i < 5; i++) {
        int x = sc.nextInt();
        a[x]++;       
      }
    } finally {
      sc.close();
    }
  }
  
  void solve() {
    for (int i = 1; i <= 5; i++) if (a[i] == 0) ans = i;
  }

  void show() {
    System.out.println(ans);
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Main main = new Main();
    main.solve();
    main.show();
  }

  int[] a;
  int ans;

  public Main() {
    Scanner sc = new Scanner(System.in);
    try {
      a = new int[6];
      for (int i = 0; i < 5; i++) {
        int x = sc.nextInt();
        a[x]++;       
      }
    } finally {
      sc.close();
    }
  }
  
  void solve() {
    for (int i = 1; i <= 5; i++) if (a[i] == 0) ans = i;
  }

  void show() {
    System.out.println(ans);
  }
}
