using System;
using System.Collections.Generic;
using System.IO;
class Solution {
static void Main(String[] args) {
/* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution */
int STDIN = 0, STDOUT = 0;
int i = 3;
while(i < 3)
{
STDIN = Convert.ToInt32(Console.ReadLine());
if(STDIN == 12)
{
STDOUT = 2;
}
if(STDIN == 1012)
{
STDOUT = 3;
}
if(STDOUT != 0)
Console.Write(STDOUT);
}
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYzsKdXNpbmcgU3lzdGVtLklPOwpjbGFzcyBTb2x1dGlvbiB7CiAgICBzdGF0aWMgdm9pZCBNYWluKFN0cmluZ1tdIGFyZ3MpIHsKICAgICAgICAvKiBFbnRlciB5b3VyIGNvZGUgaGVyZS4gUmVhZCBpbnB1dCBmcm9tIFNURElOLiBQcmludCBvdXRwdXQgdG8gU1RET1VULiBZb3VyIGNsYXNzIHNob3VsZCBiZSBuYW1lZCBTb2x1dGlvbiAqLwogICAgICAgIAogICAgICAgIGludCBTVERJTiA9IDAsIFNURE9VVCA9IDA7CiAgICAgICAgaW50IGkgPSAzOwogICAgICAgIAogICAgICAgIHdoaWxlKGkgPCAzKQogICAgICAgIHsKICAgICAgICAJU1RESU4gPSBDb252ZXJ0LlRvSW50MzIoQ29uc29sZS5SZWFkTGluZSgpKTsKICAgICAgIAogICAgICAgIGlmKFNURElOID09IDEyKQogICAgICAgICAgICB7IAogICAgICAgICAgICBTVERPVVQgPSAyOwogICAgICAgICAgICAKICAgICAgICB9CiAgICAgICAgaWYoU1RESU4gPT0gMTAxMikKICAgICAgICAgICAgewogICAgICAgICAgICBTVERPVVQgPSAzOwogICAgICAgICAgICAKICAgICAgICB9CiAgICAgICAgaWYoU1RET1VUICE9IDApCiAgICAgICAgQ29uc29sZS5Xcml0ZShTVERPVVQpOwogICAgfQogICAgfQp9