import java.util.Scanner; public class No671 { public static void main(String[] args) { Scanner s = new Scanner(System.in); String N = s.nextLine(); s.close(); int n = N.length()-2; System.out.println(Math.abs(8-n)); } }