#include<iostream>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;
int main(){
  int n;
  while(cin>>n,n){
    int co=0;
    rep(a,10){
      rep(b,10){
	rep(c,10){
	  if(n-a-b-c>=0&&n-a-b-c<10)co++;
	}
      }
    }
    cout<<co<<endl;
  }

} 