import java.util.Scanner; class main{ public static void main(String args[]){ int cnt = 0; for( int i = 1; i <= 12; i++){ for(int j = 1; j <= 31; j++){ if( j / 10 + j % 10 == i ){ cnt++; } if( i == 2 && j == 28){ break; } else if( (i == 4 || i == 6 || i == 9 || i == 11) && j == 30){ break; } } } System.out.println(cnt); } }