The Smart Beaver from ABBYY came up with another splendid problem for the ABBYY Cup participants! This time the Beaver invites the contest participants to check out a problem on sorting documents by their subjects. Let's describe the problem:

You've got some training set of documents. For each document you know its subject. The subject in this problem is an integer from 1 to 3. Each of these numbers has a physical meaning. For instance, all documents with subject 3 are about trade.

You can download the training set of documents at the following link: http://download4.abbyy.com/a2/X2RZ2ZWXBG5VYWAL61H76ZQM/train.zip. The archive contains three directories with names "1", "2", "3". Directory named "1" contains documents on the 1-st subject, directory "2" contains documents on the 2-nd subject, and directory "3" contains documents on the 3-rd subject. Each document corresponds to exactly one file from some directory.

All documents have the following format: the first line contains the document identifier, the second line contains the name of the document, all subsequent lines contain the text of the document. The document identifier is used to make installing the problem more convenient and has no useful information for the participants.

You need to write a program that should indicate the subject for a given document. It is guaranteed that all documents given as input to your program correspond to one of the three subjects of the training set.

Input

The first line contains integer id (0 ≤ id ≤ 106) — the document identifier. The second line contains the name of the document. The third and the subsequent lines contain the text of the document. It is guaranteed that the size of any given document will not exceed 10 kilobytes.

The tests for this problem are divided into 10 groups. Documents of groups 1 and 2 are taken from the training set, but their identifiers will not match the identifiers specified in the training set. Groups from the 3-rd to the 10-th are roughly sorted by the author in ascending order of difficulty (these groups contain documents which aren't present in the training set).

Output

Print an integer from 1 to 3, inclusive — the number of the subject the given document corresponds to.

Examples
#include <bits/stdc++.h>
using namespace std;
string update(string s) {
  string result = "";
  for (int i = 0; i < s.length(); ++i) {
    if (s[i] - 'A' >= 0 && s[i] - 'A' < 26) {
      result += s[i] - 'A' + 'a';
    } else if (s[i] - 'a' >= 0 && s[i] - 'a' < 26) {
      result += s[i];
    }
  }
  return result;
}
map<string, int> mp;
vector<pair<int, string> > vt;
string t1[] = {
    "the",          "said",   "and",      "bank",       "market",     "billion",
    "for",          "stg",    "mln",      "with",       "that",       "march",
    "from",         "money",  "exchange", "currency",   "had",        "dollar",
    "its",          "have",   "will",     "pct",        "treasury",   "but",
    "banks",        "not",    "bills",    "would",      "foreign",    "was",
    "today",        "this",   "dlrs",     "dealers",    "which",      "their",
    "system",       "new",    "central",  "currencies", "they",       "around",
    "monetary",     "year",   "were",     "one",        "rates",      "markets",
    "liquidity",    "japan",  "dollars",  "trading",    "assistance", "are",
    "some",         "has",    "policy",   "early",      "against",    "rate",
    "prices",       "funds",  "england",  "more",       "london",     "last",
    "fed",          "could",  "baker",    "after",      "two",        "told",
    "intervention", "help",   "fall",     "economic",   "arab",       "also",
    "yen",          "while",  "shortage", "securities", "other",      "major",
    "commodity",    "than",   "paris",    "option",     "bundesbank", "bond",
    "trade",        "states", "official", "now",        "much",       "house",
    "government",   "far",    "day",      "bought"};
int t1q[] = {575, 162, 148, 83, 67, 64, 63, 59, 57, 54, 54, 53, 52, 48, 48,
             47,  45,  45,  42, 42, 41, 40, 35, 35, 34, 33, 33, 32, 32, 31,
             30,  28,  28,  28, 27, 26, 26, 25, 25, 24, 23, 23, 22, 21, 21,
             21,  20,  20,  20, 20, 20, 19, 19, 19, 18, 18, 17, 17, 17, 16,
             16,  16,  16,  15, 15, 15, 15, 15, 15, 15, 14, 14, 14, 14, 14,
             14,  14,  14,  13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12,
             11,  11,  11,  11, 11, 11, 11, 11, 11, 11};
string t2[] = {
    "the",        "billion",    "dlrs",       "pct",       "and",
    "said",       "rose",       "from",       "money",     "mln",
    "bank",       "january",    "december",   "february",  "supply",
    "march",      "fell",       "year",       "that",      "was",
    "for",        "week",       "growth",     "with",      "reserve",
    "rise",       "deposits",   "after",      "fed",       "banks",
    "compared",   "which",      "loans",      "federal",   "end",
    "new",        "ended",      "adjusted",   "were",      "provisional",
    "november",   "stg",        "previous",   "business",  "plus",
    "last",       "yearonyear", "treasury",   "revised",   "policy",
    "its",        "balances",   "seasonally", "reserves",  "increase",
    "economists", "but",        "average",    "assets",    "york",
    "this",       "statement",  "rises",      "monetary",  "data",
    "april",      "total",      "month",      "six",       "government",
    "deposit",    "central",    "canadian",   "against",   "about",
    "there",      "rate",       "period",     "one",       "not",
    "measure",    "latest",     "had",        "grew",      "earlier",
    "currency",   "chartered",  "would",      "singapore", "sector",
    "net",        "has",        "funds",      "fall",      "while",
    "weeks",      "two",        "showed",     "savings",   "foreign"};
int t2q[] = {429, 285, 225, 220, 145, 112, 109, 102, 94, 91, 89, 76, 73, 71, 69,
             69,  65,  58,  49,  48,  48,  47,  45,  44, 40, 39, 32, 32, 31, 31,
             30,  26,  25,  25,  25,  23,  23,  23,  22, 22, 22, 20, 20, 20, 19,
             19,  18,  18,  18,  18,  18,  18,  17,  17, 17, 17, 17, 17, 17, 16,
             16,  16,  16,  16,  16,  16,  15,  15,  14, 14, 14, 14, 14, 14, 14,
             13,  13,  13,  13,  13,  13,  13,  13,  13, 13, 13, 13, 12, 12, 12,
             12,  12,  12,  12,  11,  11,  11,  11,  11, 11};
string t3[] = {"the",
               "said",
               "and",
               "trade",
               "that",
               "japan",
               "for",
               "japanese",
               "with",
               "would",
               "was",
               "from",
               "will",
               "not",
               "its",
               "but",
               "washington",
               "has",
               "they",
               "are",
               "march",
               "officials",
               "year",
               "states",
               "united",
               "billion",
               "imports",
               "tariffs",
               "last",
               "reagan",
               "nakasone",
               "dlrs",
               "this",
               "official",
               "government",
               "market",
               "have",
               "agreement",
               "against",
               "chip",
               "war",
               "over",
               "tokyo",
               "japans",
               "goods",
               "world",
               "more",
               "mln",
               "exports",
               "semiconductor",
               "foreign",
               "countries",
               "house",
               "dispute",
               "april",
               "action",
               "about",
               "their",
               "sanctions",
               "markets",
               "his",
               "which",
               "told",
               "could",
               "president",
               "pct",
               "minister",
               "industry",
               "also",
               "were",
               "semiconductors",
               "pact",
               "take",
               "deficit",
               "week",
               "sources",
               "chips",
               "than",
               "plans",
               "new",
               "after",
               "retaliation",
               "next",
               "congress",
               "been",
               "analysts",
               "two",
               "reuters",
               "other",
               "open",
               "had",
               "american",
               "visit",
               "talks",
               "surplus",
               "production",
               "now",
               "international",
               "can",
               "prime"};
int t3q[] = {
    837, 284, 274, 255, 150, 123, 119, 117, 111, 95, 76, 73, 69, 67, 67, 63, 59,
    58,  57,  57,  56,  55,  54,  54,  53,  53,  49, 48, 48, 46, 45, 45, 44, 44,
    43,  42,  42,  42,  39,  36,  35,  35,  34,  34, 34, 33, 33, 33, 33, 32, 32,
    31,  30,  30,  30,  30,  30,  29,  29,  29,  29, 28, 28, 28, 27, 27, 27, 27,
    27,  26,  26,  26,  25,  25,  24,  23,  23,  22, 22, 22, 22, 21, 21, 21, 21,
    21,  20,  20,  20,  20,  20,  20,  19,  19,  19, 19, 19, 19, 19, 18};
string texts[] = {
    "BRITISH, FRENCH MINISTERS DISCUSS PUBLIC SPENDING",
    "    LONDON, March 26 - French Finance Minister Edouard Balladur",
    "FORMER HERSTATT DEALER CAN BE SUED, COURT RULES",
    "    KASSEL, West Germany, March 26- The former chief currency",
    "U.K. MONEY MARKET DEFICIT FORECAST AT 700 MLN STG",
    "    LONDON, March 27 - The Bank of England said it forecast a",
    "BANK OF SPAIN SUSPENDS ASSISTANCE",
    "    MADRID, March 27 - The Bank of Spain suspended its daily",
    "U.K. MONEY MARKET GIVEN 265 MLN STG ASSISTANCE",
    "    LONDON, March 27 - The Bank of England said it provided the",
    "BANK OF FRANCE AGAIN BUYING DOLLARS, SOURCES SAY",
    "    PARIS, March 27 - The Bank of France intervened in the",
    "BUNDESBANK BOUGHT DOLLARS AGAINST YEN, DEALERS SAY",
    "    FRANKFURT, March 27 - The Bundesbank entered the open",
    "U.K. MONEY MARKET GIVEN FURTHER 663 MLN STG HELP",
    "    LONDON, March 27 - The Bank of England said it gave the",
    "AUSTRIA DOES NOT INTERVENE TO SUPPORT DOLLAR",
    "    VIENNA, March 27 - The Austrian National Bank did not",
    "TAIWAN TO STUDY SUSPENDING FOREX CONTROLS",
    "    TAIPEI, March 28 - Premier Yu Kuo-Hua ordered financial",
    "OFFICIAL WANTS ARAB FUND TO HELP LEBANESE POUND",
    "    ABU DHABI, March 28 - Lebanese central bank Vice Governor",
    "CHINA POSTPONES PLAN TO SCRAP PARALLEL CURRENCY",
    "    PEKING, March 28 - Chinese Vice-Premier Tian Jiyun said",
    "ARAB BANKER SAYS TOO SOON FOR SINGLE CURRENCY",
    "    ABU DHABI, March 29 - Gulf Arab states must coordinate",
    "ARAB FOREX ASSOCIATION ELECTS NEW CHAIRMAN",
    "    ABU DHABI, March 28 - The Inter-Arab Cambist Association",
    "JAPAN CAREFULLY CONSIDERING MONEY POLICY -- SUMITA",
    "    TOKYO, March 30 - Bank of Japan governor Satoshi Sumita",
    "BAHRAIN INTRODUCES NEW MONEY MARKET REGIME",
    "    BAHRAIN, March 30 - Bahrain is introducing a new domestic",
    "BANK OF ENGLAND FORECASTS SURPLUS IN MONEY MARKET",
    "    LONDON, March 30 - The Bank of England said it forecast a",
    "PHILADELPHIA EXCHANGE TO EXTEND HOURS FOR ASIA",
    "    SYDNEY, March 30 - The Philadelphia Stock Exchange (PHLX),",
    "JAPAN CONDUCTS CURRENCY SURVEY OF BIG INVESTORS",
    "    TOKYO, March 30 - A Finance Ministry official said the",
    "BANK OF ENGLAND DOES NOT OPERATE IN MONEY MARKET",
    "    LONDON, March 30 - The Bank of England said it had not",
    "ASIAN DOLLAR MARKET ASSETS FALL IN JANUARY",
    "    SINGAPORE, March 30 - The gross size of the Asian dollar",
    "PHILADELPHIA EXCHANGE TO EXTEND HOURS FOR ASIA",
    "    SYDNEY, March 30 - The Philadelphia Stock Exchange (PHLX),",
    "JAPAN CAREFULLY CONSIDERING MONEY POLICY - SUMITA",
    "    TOKYO, March 30 - Bank of Japan governor Satoshi Sumita",
    "U.K. MONEY MARKET GIVEN 129 MLN STG ASSISTANCE",
    "    LONDON, March 30 - The Bank of England said it had provided",
    "JAPAN CONDUCTS CURRENCY SURVEY OF BIG INVESTORS",
    "    TOKYO, March 30 - A Finance Ministry official said the",
    "JAPANESE SEEN LIGHTENING U.S. BOND HOLDINGS",
    "    By Yoshiko Mori, Reuters",
    "FED ADDS RESERVES VIA CUSTOMER REPURCHASES",
    "    NEW YORK, March 30 - The Federal Reserve entered the U.S.",
    "FORMER TREASURY OFFICIAL URGES CURRENCY REFORMS",
    "    WASHINGTON, March 3 - Former Treasury official C. Fred",
    "FED WILL BUY BILLS FOR CUSTOMER AFTER AUCTION",
    "    NEW YORK, March 30 - The Federal Reserve said it will enter",
    "TREASURY BALANCES AT FED FELL ON MARCH 27",
    "    WASHINGTON, March 30 - Treasury balances at the Federal",
    "U.S. CREDIT MARKETS END UNDER EXTREME PRESSURE",
    "    NEW YORK, March 30 - The U.S. credit market ended under",
    "U.K. MONEY MARKET OFFERED EARLY ASSISTANCE",
    "    LONDON, March 31 - The Bank of England said it had invited",
    "UK MONEY MARKET GIVEN FURTHER 570 MLN STG HELP",
    "    LONDON, March 31 - The Bank of England said it provided the",
    "CALL MONEY PRESSURE FROM LARGE GERMAN BANKS",
    "    By Allan Saunderson, Reuters",
    "U.K. MONEY MARKET SHORTAGE FORECAST REVISED UP",
    "    LONDON, March 31 - The Bank of England said it had revised",
    "U.K. MONEY MARKET GIVEN 215 MLN STG LATE HELP",
    "    LONDON, March 31 - The Bank of England said it had provided",
    "U.S. TREASURY'S BAKER SEES RATE STABILITY",
    "    WASHINGTON, March 31 - Treasury Secretary James Baker said",
    "TREASURY'S BAKER SAYS COOPERATION WORKING",
    "    WASHINGTON, March 31 - Treasury Secretary James Baker said",
    "TREASURY'S BAKER SAYS U.S. BACKS STABILITY",
    "    WASHINGTON, March 31 - Treasury Secretary James Baker said",
    "BANGEMANN CALLS FOR CURRENCY CALM",
    "    HANOVER, March 31 - West German Economics Minister Martin",
    "TREASURY'S BAKER PURSUING S. ASIAN REVALUATIONS",
    "    WASHINGTON, March 31 - Treasury Secretary James Baker told",
    "TREASURY'S BAKER PURSUING S. ASIAN REVALUATIONS",
    "    WASHINGTON, March 31 - Treasury Secretary James Baker told",
    "CURRENCY FUTURES CLIMB LIKELY TO BE CHECKED",
    "    By Leslie Adler, Reuters",
    "U.S. FED EXPLORES COMMODITY BASKET INDEX",
    "    By Alver Carlson, Reuters",
    "U.K. MONEY MARKET OFFERED EARLY ASSISTANCE",
    "    LONDON, April 1 - The Bank of England said it had invited",
    "U.K. MONEY MARKET GIVEN 689 MLN STG EARLY HELP",
    "    LONDON, April 1 - The Bank of England said it had provided",
    "U.K. MONEY MARKET SHORTAGE FORECAST REVISED UP",
    "    LONDON, April 1 - The Bank of England said it had revised",
    "U.K. MONEY MARKET DEFICIT REVISED DOWNWARDS",
    "    LONDON, April 1 - The Bank of England said it has revised",
    "FED BUYS ONE BILLION DLRS OF BILLS FOR CUSTOMER",
    "    NEW YORK, April 1 - The Federal Reserve is buying one",
    "FED BUYS ONE BILLION DLRS OF BILLS FOR CUSTOMER",
    "    NEW YORK, April 1 - The Federal Reserve is buying one",
    "N.Z. TRADING BANK DEPOSIT GROWTH RISES SLIGHTLY",
    "    WELLINGTON, Feb 27 - New Zealand's trading bank seasonally",
    "NEW YORK BUSINESS LOANS FALL 222 MLN DLRS",
    "    NEW YORK, March 26 - Commercial and industrial loans on the",
    "U.S. M-1 MONEY SUPPLY RISES 1.2 BILLION DLR",
    "    NEW YORK, March 26 - U.S. M-1 money supply rose 1.2 billion",
    "CANADIAN MONEY SUPPLY FALLS IN WEEK",
    "    OTTAWA, March 27 - Canadian narrowly defined money supply",
    "DUTCH MONEY SUPPLY HARDLY CHANGED IN DECEMBER",
    "    AMSTERDAM, March 30 - Dutch seasonally adjusted M2 money",
    "U.K. CONFIRMS FEBRUARY STERLING M3 RISE",
    "    LONDON, March 30 - The Bank of England said the broad",
    "SINGAPORE M-1 MONEY SUPPLY 2.7 PCT UP IN JANUARY",
    "    SINGAPORE, March 30 - Singapore's M-1 money supply  rose",
    "SINGAPORE BANK CREDIT RISES IN JANUARY",
    "    SINGAPORE, March 30 - Total loans and advances extended by",
    "H.K. M3 MONEY SUPPLY RISES 1.4 PCT IN FEBRUARY",
    "    HONG KONG, March 30 - Hong Kong's broadly defined M-3 money",
    "U.S. BANK DISCOUNT BORROWINGS 310 MLN DLRS",
    "    NEW YORK, Feb 26 - U.S. bank discount window borrowings",
    "U.S. M-1 MONEY SUPPLY ROSE 2.1 BILLION DLRS",
    "    NEW YORK, Feb 26 - U.S. M-1 money supply rose 2.1 billion",
    "AUSTRALIAN BROAD MONEY GROWTH 10.3 PCT IN FEBRUARY",
    "    SYDNEY, April 1 - Australian annual broad money growth rose",
    "TAIWAN ISSUES MORE CERTIFICATES OF DEPOSIT",
    "    TAIPEI, April 3 - The Central Bank issued 5.65 billion dlrs",
    "SOUTH KOREAN MONEY SUPPLY FALLS IN MARCH",
    "    SEOUL, April 3 - South Korea's M-2 money supply fell two",
    "BELGIAN MONEY SUPPLY RISES IN FOURTH QUARTER 1986",
    "    BRUSSELS, April 3 - Belgian total money stock rose to",
    "CANADIAN MONEY SUPPLY FALLS IN WEEK",
    "    OTTAWA, April 3 - Canadian narrowly-defined money supply",
    "TREASURY BALANCES AT FED ROSE ON FEB 27",
    "    WASHINGTON, March 3 - Treasury balances at the Federal",
    "FEBRUARY FOMC VOTES UNCHANGED MONETARY POLICY",
    "    NEW YORK, April 3 - The Federal Open Market Committee at",
    "U.S. BUSINESS LOANS FELL 822 MLN DLRS",
    "    WASHINGTON, April 3 - Business loans on the books of major",
    "GERMAN CAPITAL ACCOUNT IN DEFICIT IN FEBRUARY",
    "    FRANKFURT, April 7 - West Germany recorded a net outflow of",
    "TREASURY BALANCES AT FED ROSE ON APRIL 6",
    "    WASHINGTON, April 7 - Treasury balances at the Federal",
    "TAIWAN ISSUES MORE CDS TO CURB MONEY SUPPLY GROWTH",
    "    TAIPEI, March 5 - The central bank has issued 7.08 billion",
    "SOUTH KOREAN MONEY SUPPLY RISES IN FEBRUARY",
    "    SEOUL, March 5 - South Korea's M-2 money supply rose 0.39",
    "SPAIN RAISES BANKS' RESERVE REQUIREMENT",
    "    MADRID, March 5 - The Bank of Spain said it raised the",
    "N.Z. MONEY SUPPLY RISES 3.6 PCT IN DECEMBER",
    "    WELLINGTON, Feb 27 - New Zealand's broadly defined,",
    "FED DATA SUGGEST STABLE U.S. MONETARY POLICY",
    "    by Jeremy Solomons, Reuters",
    "N.Z. CENTRAL BANK SEES SLOWER MONEY, CREDIT GROWTH",
    "    WELLINGTON, Feb 27 - Monetary and credit growth rates in",
    "U.S. M-1 MONEY SUPPLY RISES 1.9 BILLION DLRS",
    "    NEW YORK, March 5 - U.S. M-1 money supply rose 1.9 billion",
    "U.S. MONEY GROWTH SLOWS SHARPLY, ECONOMISTS SAY",
    "    By Alan Wheatley, Reuters",
    "CANADIAN MONEY SUPPLY RISES IN WEEK",
    "    OTTAWA, March 6 - Canadian narrowly-defined money supply",
    "TREASURY BALANCES AT FED FELL ON MARCH 5",
    "    WASHINGTON, March 6 - Treasury balances at the Federal",
    "U.S. BUSINESS LOANS FALL 618 MLN DLRS",
    "    WASHINGTON, March 6 - Business loans on the books of major",
    "SINGAPORE M-1 MONEY SUPPLY UP 3.7 PCT IN DECEMBER",
    "    SINGAPORE, March 9 - Singapore's M-1 money supply rose 3.7",
    "FRENCH JANUARY M-3 MONEY SUPPLY RISES ONE PCT",
    "    PARIS, March 9 - French money supply, measured in terms of",
    "U.K. CONFIRMS JANUARY STERLING M3 RISE",
    "    LONDON, March 2 - The Bank of England said the broad",
    "TREASURY BALANCES AT FED ROSE ON MARCH 6",
    "    WASHINGTON, March 9 - Treasury balances at the Federal",
    "SPAIN'S MONEY SUPPLY GROWTH DOUBLES IN FEBRUARY",
    "    MADRID, March 11 - Spain's broad based M-4 money supply",
    "TREASURY BALANCES AT FED FELL ON MARCH 10",
    "    WASHINGTON, March 11 - Treasury balances at the Federal",
    "NEW YORK BUSINESS LOANS FALL 718 MLN DLRS",
    "    NEW YORK, March 12 - Commercial and industrial loans on the",
    "U.S. M-1 MONEY SUPPLY FALLS 600 MLN DLRS",
    "    NEW YORK, March 12 - U.S. M-1 money supply fell 600 mln",
    "JAPAN PERSONAL SAVINGS SOAR IN 1986",
    "    TOKYO, March 13 - Japanese personal savings grew 10.3 pct",
    "CANADIAN MONEY SUPPLY RISES IN WEEK",
    "    OTTAWA, March 13 - Canadian narrowly-defined money supply",
    "U.S. BUSINESS LOANS RISE 377 MLN DLRS",
    "    WASHINGTON, March 13 - Business loans on the books of major",
    "BANGLADESH MONEY SUPPLY RISES IN DECEMBER",
    "    DHAKA, March 16 - Bangladesh's broad-based M2 money supply",
    "GERMAN FEBRUARY CENTRAL BANK MONEY GROWTH STEADY",
    "    FRANKFURT, March 16 - West German central bank money stock",
    "THAI M-1 MONEY SUPPLY RISES IN JANUARY",
    "    BANGKOK, March 17 - Thailand's M-1 money supply rose 9.8",
    "JAPAN FEBRUARY MONEY SUPPLY RISES 8.8 PCT",
    "    TOKYO, March 17 - Japan's broadly defined money supply",
    "ASSETS OF U.S. MONEY FUNDS ROSE IN WEEK",
    "    WASHINGTON, Feb 26 - Assets of money market mutual funds",
    "ITALY M-2 UP 2.8 PCT IN 3 MONTHS TO END JANUARY",
    "    ROME, March 18 - Italian M-2 money supply rose a",
    "PHILIPPINES' LIQUIDITY RISES, LOAN DEMAND FALLS",
    "    MANILA, March 19 - Liquidity in the Philippines rose in",
    "WHITE HOUSE UNIT DECIDES ON SEMICONDUCTORS",
    "    WASHINGTON, March 26 - The White House Economic Policy",
    "CHINA CALLS FOR BETTER TRADE DEAL WITH U.S.",
    "    PEKING, March 3 - China called on the United States to",
    "GATT WARNS U.S. ON FEDERAL BUDGET, PROTECTIONISM",
    "     GENEVA, March 27 - The United States' emphasis on its",
    "WHITE HOUSE PANEL SAID URGING JAPAN RETALIATION",
    "    WASHINGTON, March 26 - The White House Economic Policy",
    "NAKASONE TO VISIT WASHINGTON IN LATE APRIL",
    "    TOKYO, March 27 - Prime Minister Yasuhiro Nakasone will",
    "WORLD BANK CHIEF URGES MORE JAPANESE INVESTMENT",
    "    TOKYO, March 27 - World Bank President Barber Conable",
    "NAKASONE TO VISIT WASHINGTON IN LATE APRIL",
    "    TOKYO, March 27 - Prime Minister Yasuhiro Nakasone will",
    "NAKASONE HARD-PRESSED TO SOOTHE U.S ANGER ON TRADE",
    "    By Rich Miller, Reuters",
    "INDIA STEPS UP COUNTERTRADE DEALS TO CUT TRADE GAP",
    "    By Ajoy Sen, Reuters",
    "UK MAY REVOKE JAPANESE FINANCIAL LICENSES",
    "    By Sten Stovall, Reuters",
    "REAGAN READY TO IMPOSE TRADE CURBS AGAINST JAPAN",
    "    WASHINGTON, March 27 - President Reagan was ready to impose",
    "JAPAN'S CHIP MAKERS ANGERED BY U.S. SANCTION PLANS",
    "    TOKYO, March 28 - Japanese computer chip makers reacted",
    "NAKASONE SOUNDS CONCILIATORY NOTE IN CHIP DISPUTE",
    "    TOKYO, March 28 - Prime Minister Yasuhiro Nakasone sounded",
    "ISLAMIC BANKS ESTABLISH 50 MLN DLR TRADE PORTFOLIO",
    "    ISTANBUL, March 28 - The Islamic Development Bank (IDB) and",
    "TOKYO BIDS TO STOP CHIP ROW TURNING INTO TRADE WAR",
    "    By Rich Miller, Reuters",
    "BALDRIGE PREDICTS END OF U.S.-JAPAN TRADE DISPUTE",
    "    WASHINGTON, March 29 - The United States and Japan will",
    "JAPAN HAS LITTLE NEW TO OFFER IN MICROCHIP DISPUTE",
    "    By Linda Sieg, Reuters",
    "NAKASONE SOUNDS CONCILIATORY NOTE IN CHIP DISPUTE",
    "    TOKYO, March 30 - Prime Minister Yasuhiro Nakasone sounded",
    "TOKYO BIDS TO STOP CHIP ROW BECOMING TRADE WAR",
    "    By Rich Miller, Reuters",
    "BALDRIGE PREDICTS END OF U.S.-JAPAN TRADE DISPUTE",
    "    WASHINGTON, March 30 - The United States and Japan will",
    "YUGOSLAV TRADE FALLS SHARPLY  STATISTICS SHOW",
    "    BELGRADE, March 30 - Yugoslav trade is declining rapidly",
    "ECONOMIC SPOTLIGHT - U.S. CONGRESS RAPS JAPAN",
    "    By Jacqueline Frank, Reuter",
    "U.S. TRADE OFFICIAL SAYS JAPAN ACTION FOOLISH",
    "    By Jacqueline Frank, Reuters",
    "EUROPEAN COMMUNITY TO SET UP OFFICE IN PEKING",
    "    PEKING, March 31 - China and the European Community (EC)",
    "TRADE FRICTION THREATENS TO TOPPLE NAKASONE",
    "    By Linda Sieg, Reuters",
    "EUROPE ON SIDELINES IN U.S-JAPAN MICROCHIP ROW",
    "    By David Ress, Reuters",
    "THATCHER SAYS TRADE TARGETS SET WITH MOSCOW",
    "    MOSCOW, March 31 - British Prime Minister Margaret Thatcher",
    "JAPAN TO CUT MICROCHIP OUTPUT, BOOST IMPORTS",
    "    By Steven Brull, Reuters",
    "JAPAN WILL ASK COMPANIES TO BOOST IMPORTS",
    "    TOKYO, March 31 - Japan's Minister of International Trade",
    "U.S./JAPAN TRADE WAR NOT IN UK'S INTEREST - LAWSON",
    "    LONDON, March 31 - U.K. Chancellor of the Exchequer Nigel",
    "EC APPROVES MEDITERRANEAN FINANCIAL PACKAGES",
    "    BRUSSELS, March 31 - EC ministers have approved financial",
    "SOVIET UNION SEEN WATCHING CHINA GATT APPLICATION",
    "    PEKING, March 31 - China's application to join the General",
    "U.S. SENATE LEADERS SEE NO TRADE WAR BREWING",
    "    WASHINGTON, March 31 - The Senate's Democratic and ",
    "U.S. STOCK MARKET OVERREACTS TO TARIFFS - YEUTTER",
    "    WASHINGTON, March 31 - U.S. Trade Representative Clayton",
    "ENVOY ADVISES NAKASONE TO PREPARE FOR U.S. VISIT",
    "    TOKYO, March 31 - The Japanese ambassador to the U.S.",
    "TREASURY'S BAKER SEES SMALLER TRADE DEFICIT",
    "    WASHINGTON, March 31 - Treasury secretary James Baker",
    "TREASURY'S BAKER NOT CONCERNED BY BOND DECLINES",
    "    WASHINGTON, March 31 - Treasury Secretary James Baker,",
    "U.S.-JAPAN NOT IN TRADE WAR, YEUTTER SAYS",
    "    WASHINGTON, March 31 - The United States and Japan are not",
    "CHIRAC, REAGAN DISCUSS ARMS CONTROL, TRADE",
    "    WASHINGTON, March 31 - French Prime Minister Jacques Chirac",
    "TRADE WAR FEARS MAY PROMPT STOCK MARKETS' DOWNTURN",
    "    By David Ress, Reuters",
    "WHITE HOUSE DISCOUNTS THREAT OF TRADE WAR",
    "    WASHINGTON, March 31 - President Reagan has reaffirmed his",
    "BALDRIGE SAYS U.S. TO IMPOSE JAPANESE SANCTIONS",
    "    WASHINGTON, March 31 - Commerce Secretary Malcolm Baldrige",
    "SENIOR U.S. OFFICIAL TO VISIT JAPAN AS TRADE ROW GROWS",
    "    WASHINGTON, March 31 - Undersecretary of State Michael",
    "BROADER U.S. EEP SOUGHT BY REPUBLICAN LAWMAKERS",
    "    WASHINGTON, MARCH 31 - Republican members of the House",
    "U.S. OFFICIAL TO VISIT JAPAN AS TRADE ROW GROWS",
    "    WASHINGTON, March 31 - Undersecretary of State Michael",
    "U.S. OFFICIAL SEES EVIDENCE OF EXPORT GROWTH",
    "    WASHINGTON, March 31 - Beryl Sprinkel, chairman of the",
    "TAIWAN'S SECOND QUARTER IMPORTS SEEN RISING",
    "    TAIPEI, April 1 - Taiwan's imports in the second quarter of",
    "BELGIAN SAYS EC WOULD REACT TO TEXTILE BILL",
    "    WASHINGTON, March 3 - Belgian Foreign Trade Minister Herman",
    "ROSTENKOWSKI OPPOSES PROTECTIONIST TRADE BILL",
    "    WASHINGTON, March 3 - House Ways and Means Committee",
    "U.K. EXPORTS BODY GETS NEW EXECUTIVE DIRECTOR",
    "    London, March 3 - Export Credits Guarantee Department has"};
int main() {
  int cur;
  scanf("%d\n", &cur);
  char line1[100];
  gets(line1);
  int len = strlen(line1);
  char line2[100];
  gets(line2);
  len = strlen(line2);
  string t1 = line1;
  string t2 = line2;
  int index = -1;
  for (int i = 0; i < 300; i += 2) {
    if (texts[i] == t1) {
      index = i;
      break;
    }
  }
  cout << index / 100 + 1 << endl;
  return 0;
}
