#include<iostream> using namespace std; int main() { int ansx=0; int left,right; cin>>left>>right; while(left<=right) { int k=1; int g=left; while(g>0) { int g_=g/k%10; if(g_==2) { ansx++; } g/=k; k*=10; } left++; } cout<<ansx; return 0; }