import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); while(sc.hasNext()){ int a1=sc.nextInt(); int a2=sc.nextInt(); int a3=sc.nextInt(); if(a1==a2 || a1==a3 || a2==a3) System.out.println(0); else if(a2>a1 && a2>a3 || a2b1 && b2>b3 || b2