#include using namespace std; typedef long long ll; typedef pair P; const int INF = 1e9; const int mod = 1e9+7; const double EPS = 1e-10; const double PI = acos(-1.0); int main() { int ans = 0; int a[] = {0,31,28,31,30,31,30,31,31,30,31,30,31}; for(int i = 1; i <= 12; i++){ for(int j = 1; j <= a[i]; j++){ if(i == j/10+j%10) ans++; } } cout << ans << endl; return 0; }