Problem:
Score : 100 points

Problem Statement

Print the K-th element of the following sequence of length 32:

1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51

Constraints

1 \leq K \leq 32

All values in input are integers.

Input

Input is given from Standard Input in the following format:

K

Output

Print the K-th element.

Sample Input 1

6

Sample Output 1

2

The 6-th element is 2.

Sample Input 2

27

Sample Output 2

5

The 27-th element is 5.

Solution in C (Clang 3.8.0) (judge verdict: Accepted)

#include <stdio.h>
int main(){
  int n,m[32],l;
  scanf("%d",&l);
  for(n=0;n<32;n++){
    if(n==31){
      m[n]=51;
    }else if(n==23){
      m[n]=15;
    }else if(n==15){
      m[n]=14;
    }else if(n==27 || n==29){
      m[n]=4;
    }else if(n==7 || n==11 || n==17 || n==19 ||n==26){
      m[n]=5;
    }else if(n==3 || n==5 || n==8 || n==9 ||n==13 ||n==20|| n==21 ||n==24 ||n==25){
      m[n]=2;
    }else{
      m[n]=1;
    }
    
  }
  printf("%d",m[l-1]);
  return 0;
}