import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String[] s = sc.nextLine().split(",");
        int r = (1 + s.length)*s.length/2;//等差数列求和
        for(String i : s) r -= Integer.valueOf(i);//最后的差就是结果
        System.out.println(r);
    }
}