import java.util.Scanner;

class Main {

	public static void main(String[] args) {

		int count = 0;
		String x;

		Scanner sc = new Scanner(System.in);

		String str = sc.next();

		for (int i1 = 0, i2 = 1; i2 <= str.length(); i1++, i2++) {

			x = str.substring(i1, i2);

			if (x.equals("1")) {

				count++;

			}

		}

		System.out.println(count);

		sc.close();

	}
} import java.util.Scanner; Scanner java.util class Main {

	public static void main(String[] args) {

		int count = 0;
		String x;

		Scanner sc = new Scanner(System.in);

		String str = sc.next();

		for (int i1 = 0, i2 = 1; i2 <= str.length(); i1++, i2++) {

			x = str.substring(i1, i2);

			if (x.equals("1")) {

				count++;

			}

		}

		System.out.println(count);

		sc.close();

	}
} Main public static void main(String[] args) {

		int count = 0;
		String x;

		Scanner sc = new Scanner(System.in);

		String str = sc.next();

		for (int i1 = 0, i2 = 1; i2 <= str.length(); i1++, i2++) {

			x = str.substring(i1, i2);

			if (x.equals("1")) {

				count++;

			}

		}

		System.out.println(count);

		sc.close();

	} main {

		int count = 0;
		String x;

		Scanner sc = new Scanner(System.in);

		String str = sc.next();

		for (int i1 = 0, i2 = 1; i2 <= str.length(); i1++, i2++) {

			x = str.substring(i1, i2);

			if (x.equals("1")) {

				count++;

			}

		}

		System.out.println(count);

		sc.close();

	} int count = 0; count 0 String x; x Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc for (int i1 = 0, i2 = 1; i2 <= str.length(); i1++, i2++) {

			x = str.substring(i1, i2);

			if (x.equals("1")) {

				count++;

			}

		} int i1 = 0, i2 = 1; int i1 = 0 i1 0 i2 = 1; i2 1 i2 <= str.length() i2 str.length() str.length str i1++, i2++ i1++ i1 i2++ i2 {

			x = str.substring(i1, i2);

			if (x.equals("1")) {

				count++;

			}

		} {

			x = str.substring(i1, i2);

			if (x.equals("1")) {

				count++;

			}

		} x = str.substring(i1, i2) x str.substring(i1, i2) str.substring str i1 i2 if (x.equals("1")) {

				count++;

			} x.equals("1") x.equals x "1" {

				count++;

			} count++ count System.out.println(count) System.out.println System.out System System.out count sc.close() sc.close sc String[] args args
import java.util.Scanner;

class Main {

	public static void main(String[] args) {

		int count = 0;
		String x;

		Scanner sc = new Scanner(System.in);

		String str = sc.next();

		for (int i1 = 0, i2 = 1; i2 <= str.length(); i1++, i2++) {

			x = str.substring(i1, i2);

			if (x.equals("1")) {

				count++;

			}

		}

		System.out.println(count);

		sc.close();

	}
}