#include<stdio.h>
int main()
{
    int severity;
    scanf("%d", &severity);
    if(severity >=1 && severity<=3)
    {
        printf("Invalid input");
    } 
     else if(severity >=1 && severity<=3)
       {
     printf("Allocation: 1 ambulance and 1 police unit");
      
    
    else if(severity >=4 && severity >=6)
    {
        printf("Allocation: 2 ambulance and 1 fire unit");
    }
    else if(severity >=7 && severity >=9)
    {
        printf("Allocation: 3 ambulance ,2 police units, and 1 fire unit");
        
    }
    else if(severity ==10)
    {
        printf("Allocation: 5 ambulance ,3 police units, 2 fire units, and 1 air support unit");
    }
    else if(severity >=1 && severity<=3)
    {
    }
    return 0;
}