#! /usr/bin/python3

import sys
import re

if __name__ == '__main__':
    if len(sys.argv)>1:
        allowed_vlan = sys.argv[1]
        if re.search('[0-9]{1,4}-[0-9]{1,4}', allowed_vlan):
            for tmp in allowed_vlan.split('-'):
                if int(tmp) not in range(1, 4095):
                    sys.exit(1)
        else:
            if int(allowed_vlan) not in range(1, 4095):
                sys.exit(1)
    else:
        sys.exit(2)
    
    sys.exit(0)