package com.company;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String v2 = sc.next();
        int output = 0;
        int x = 0;

        do{
                switch (Character.getNumericValue(v2.charAt(x))%10){
                    case 0:
                        break;
                    case 1:
                        output++;
                        break;
                    case 2:
                        output++;
                        break;
                    case 3:
                        output++;output++;
                        break;
                    case 4:
                        output++;output++;
                        break;
                    case 5:
                        output++;
                        break;
                    case 6:
                        output++;output++;
                        break;
                    case 7:
                        output++;output++;
                        break;
                    case 8:
                        output++;output++;output++;
                        break;
                    case 9:
                        output++;output++;output++;
                        break;
                }
                x++;
        }while (x<v2.length());

        System.out.println(output);
    }
}