// The "Program2" class.
import java.awt.*;
import java.io.*;
import java.util.*;
import hsa.Console;

public class Program2
{
    static Console c;           // The output console

    public static void main (String[] args) throws IOException
    {
	 c = new Console ();
	BufferedReader br = new BufferedReader (new FileReader ("DATA2.txt"));
	PrintWriter pw = new PrintWriter (new FileWriter ("OUT2.txt"));
	String ab[] = new String [6];
	char ab2[] = new char [6];
	int number[] = new int [6];
	String input = br.readLine ();
	int total = 0;
	while (input != null)
	{
	    for (int i = 0 ; i < 6 ; i++)
		ab2 [i] = input.charAt (i);
	}
	br.close();

	for (int i = 0 ; i < 6 ; i++)
	{
	    ab [i] = ab [i] + "";
	    number [i] = Integer.parseInt (ab [i]);
	    total += number [i];
	}
	int numtotal = total / 10 + total % 10;
	pw.println (numtotal);
	pw.close ();
	// Place your program here.  'c' is the output console
    } // main method
} // Program2 class

