import java.util.*; class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); String n = in.next(); int r = 10; System.out.println(Math.abs(r-n.length())); } }