import java.io.InputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.*;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;

public class Main {

  public static void main(String[] args) {
    solve(System.in, System.out);
  }

  static void solve(InputStream is, PrintStream os) {
    Scanner sc = new Scanner(is);

    /* read */
    int n = sc.nextInt();
    int r = sc.nextInt();

    int x = r;

    if (n < 10) {
      x += 100 * (10 - n);
    }

    os.println(x);
  }

  private static class GridPointEncoder implements Encoder<GridPoint> {

    public GridPointEncoder(int h, int w) {
      this.h = h;
      this.w = w;
    }

    private final int h;
    private final int w;

    @Override
    public int num() {
      return w * h;
    }

    @Override
    public int encode(GridPoint from) {
      return w * from.r + from.c;
    }

    @Override
    public GridPoint decode(int from) {
      return new GridPoint(from / w, from % w);
    }
  }

  private static class GridPoint implements Encoded<GridPoint> {

    private final int r;
    private final int c;

    public GridPoint(int r, int c) {
      this.r = r;
      this.c = c;
    }

    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      GridPoint gridPoint = (GridPoint) o;
      return r == gridPoint.r &&
          c == gridPoint.c;
    }

    @Override
    public int hashCode() {
      return Objects.hash(r, c);
    }
  }

  private static class VerticalHorizontalNeighborGridPointGraph extends GridPointGraph {

    private final boolean[][] grid;

    private final Predicate<GridPoint> predicate = this::predicate;
    private int[][] moves = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}};

    public VerticalHorizontalNeighborGridPointGraph(int h, int w, boolean[][] grid) {
      super(h, w);
      this.grid = grid;
    }

    private boolean predicate(GridPoint p) {
      if (p.r < 0 || h <= p.r) {
        return false;
      }
      if (p.c < 0 || w <= p.c) {
        return false;
      }
      return grid[p.r][p.c];
    }

    private Set<Edge<GridPoint>> neighbors(GridPoint from) {

      return Arrays.stream(moves)
          .map(move -> new GridPoint(from.r + move[0], from.c + move[1]))
          .filter(predicate)
          .map(to -> new ConstantWeightEdge<>(from, to))
          .collect(Collectors.toSet());
    }

    @Override
    public Set<Edge<GridPoint>> getEdges(GridPoint from) {
      if (predicate.test(from)) {
        return neighbors(from);
      } else {
        return Collections.emptySet();
      }
    }
  }

  private static class AdjacencyMatrixGridPointGraph extends IntVertexGraph {

    private final Set<Integer> vertexes = new HashSet<>();

    private final int n;
    private final int[][] matrix;

    public AdjacencyMatrixGridPointGraph(int n, int[][] matrix) {
      this.n = n;
      this.matrix = matrix;
      IntStream.range(0, n).forEach(vertexes::add);
    }

    @Override
    public Set<Integer> getVertexes() {
      return vertexes;
    }

    @Override
    public Set<Edge<Integer>> getEdges(Integer from) {
      return IntStream.range(0, n).mapToObj(to -> new Edge<>(from, to, matrix[from][to]))
          .collect(Collectors.toSet());
    }
  }

  private static class AdjacencyListGridPointGraph extends IntVertexGraph {

    private final Set<Integer> vertexes = new HashSet<>();

    private final int n;
    private final List<Set<Edge<Integer>>> edges;

    public AdjacencyListGridPointGraph(int n, List<Set<Edge<Integer>>> edges) {
      this.n = n;
      this.edges = edges;
      IntStream.range(0, n).forEach(vertexes::add);
    }

    @Override
    public Set<Integer> getVertexes() {
      return vertexes;
    }

    @Override
    public Set<Edge<Integer>> getEdges(Integer from) {
      return edges.get(from);
    }
  }

  private static abstract class GridPointGraph extends EncodedGraph<GridPoint> {

    public GridPointGraph(int h, int w) {
      super(new GridPointEncoder(h, w));
      this.h = h;
      this.w = w;

      for (int r = 0; r < h; r++) {
        for (int c = 0; c < w; c++) {
          nodes.add(new GridPoint(r, c));
        }
      }
    }

    protected final int h;
    protected final int w;

    protected final Set<GridPoint> nodes = new HashSet<>();

    @Override
    public Set<GridPoint> getVertexes() {
      return nodes;
    }
  }

  private static interface Encoded<E extends Encoded> {

  }

  private static interface Encoder<E extends Encoded> {

    int num();

    int encode(E from);

    E decode(int from);
  }

  private static abstract class EncodedGraph<V extends Encoded<V>> implements Graph<V> {

    public EncodedGraph(Encoder<V> encoder) {
      this.encoder = encoder;
      this.delegate = new IntVertexGraph() {
        @Override
        public Set<Integer> getVertexes() {
          return EncodedGraph.this.getVertexes().stream()
              .map(encoder::encode)
              .collect(Collectors.toSet());
        }

        @Override
        public Set<Edge<Integer>> getEdges(Integer from) {
          return EncodedGraph.this.getEdges(encoder.decode(from)).stream()
              .map(e -> new Edge<>(encoder.encode(e.getFrom()), encoder.encode(e.getTo()),
                  e.getWeight()))
              .collect(Collectors.toSet());
        }
      };
    }

    private final Encoder<V> encoder;
    private final IntVertexGraph delegate;

    public PathQuery<V> pathQuery(Function<Graph<Integer>, PathQuery<Integer>> delegate) {
      return new EncodedPathQuery<>(delegate, this);
    }

    private static class EncodedPathQuery<V extends Encoded<V>> implements PathQuery<V> {

      EncodedGraph<V> graph;
      PathQuery<Integer> delegate;

      private EncodedPathQuery(Function<Graph<Integer>, PathQuery<Integer>> delegate,
          EncodedGraph<V> graph) {
        this.graph = graph;
        this.delegate = delegate.apply(graph.delegate);
      }

      @Override
      public VertexPath<V> path(V begin, V end) {
        VertexPath<Integer> path = delegate
            .path(graph.encoder.encode(begin), graph.encoder.encode(end));
        if (path == null) {
          return null;
        }
        return new EfficientVertexPath<>(graph.encoder.decode(path.getBegin()),
            graph.encoder.decode(path.getEnd()), path.getWeight());
      }
    }
  }

  private static interface PathQuery<V> {

    Graph.VertexPath<V> path(V begin, V end);
  }

  private static abstract class QueuedPathQuery implements PathQuery<Integer> {

    protected final Graph<Integer> graph;
    private final Queue<Graph.VertexPath<Integer>> queue;

    public QueuedPathQuery(Graph<Integer> graph, Queue<Graph.VertexPath<Integer>> queue) {
      this.graph = graph;
      this.queue = queue;
    }

    public Graph.VertexPath<Integer> path(Integer begin, Integer end) {

      prepare(begin, end);

      queue.add(new Graph.EfficientVertexPath<>(begin));

      while (!queue.isEmpty()) {
        Graph.VertexPath<Integer> path = queue.remove();
        Integer head = path.getEnd();

        if (head.equals(end)) {
          return path;
        }
        for (Graph.Edge<Integer> e : graph.getEdges(head)) {
          if (predicate(e)) {
            Graph.VertexPath<Integer> p = path.append(e);
            queue.add(p);
            mark(path, e, p);
          }
        }
      }
      return null;
    }

    abstract void prepare(Integer begin, Integer end);

    abstract boolean predicate(Graph.Edge<Integer> edge);

    abstract void mark(Graph.VertexPath<Integer> existing, Graph.Edge<Integer> edge,
        Graph.VertexPath<Integer> path);
  }

  private static class DijkstraPathQuery extends QueuedPathQuery {

    private final long[] distance;

    public DijkstraPathQuery(Graph<Integer> graph) {
      super(graph, new PriorityQueue<>(
          Comparator.comparingLong(Graph.VertexPath::getWeight)));
      distance = new long[graph.getVertexes().size()];
    }

    @Override
    void prepare(Integer begin, Integer end) {
      IntStream.range(0, graph.getVertexes().size())
          .forEach(i -> distance[i] = Integer.MAX_VALUE);
      distance[begin] = 0;
    }

    @Override
    boolean predicate(Graph.Edge<Integer> edge) {
      return distance[edge.getFrom()] + edge.getWeight() < distance[edge.getTo()];
    }

    @Override
    void mark(Graph.VertexPath<Integer> existing, Graph.Edge<Integer> edge,
        Graph.VertexPath<Integer> path) {
      distance[path.getEnd()] = path.getWeight();
    }
  }

  private static class BfsPathQuery extends QueuedPathQuery {

    private final Set<Integer> visited = new HashSet<>();

    public BfsPathQuery(Graph<Integer> graph) {
      super(graph, new ArrayDeque<>());
    }

    @Override
    void prepare(Integer begin, Integer end) {
      visited.add(begin);
    }

    @Override
    boolean predicate(Graph.Edge<Integer> edge) {
      return !visited.contains(edge.getTo());
    }

    @Override
    void mark(Graph.VertexPath<Integer> existing, Graph.Edge<Integer> edge,
        Graph.VertexPath<Integer> path) {
      visited.add(path.getEnd());
    }
  }

  private static abstract class MemoDfsPathQuery extends DfsPathQuery {

    public MemoDfsPathQuery(Graph<Integer> graph) {
      super(graph);
    }

    abstract Graph.VertexPath<Integer> memo(Graph.VertexPath<Integer> path, Integer parent,
        Integer end);

    @Override
    public Graph.VertexPath<Integer> path(Graph.VertexPath<Integer> path, Integer parent,
        Integer end) {
      Graph.VertexPath<Integer> memo = memo(path, parent, end);
      if (memo != null) {
        return memo;
      }
      return super.path(path, parent, end);
    }
  }

  private static class DfsPathQuery implements PathQuery<Integer> {

    protected final Graph<Integer> graph;

    public DfsPathQuery(Graph<Integer> graph) {
      this.graph = graph;
    }

    @Override
    public Graph.VertexPath<Integer> path(Integer begin, Integer end) {
      return path(new Graph.EfficientVertexPath<>(begin), null, end);
    }

    protected Graph.VertexPath<Integer> path(Graph.VertexPath<Integer> path, Integer parent,
        Integer end) {
      Integer head = path.getEnd();
      if (path.getEnd().equals(end)) {
        return path;
      }
      for (Graph.Edge<Integer> e : graph.getEdges(head)) {
        if (!e.getTo().equals(parent)) {
          Graph.VertexPath<Integer> next = path(path.append(e), head, end);
          if (next != null) {
            return next;
          }
        }
      }
      return null;
    }
  }

  private static class WarshallFloydQuery implements PathQuery<Integer> {

    private Graph.VertexPath<Integer>[][] shortest;

    private WarshallFloydQuery(Graph<Integer> graph) {
      Set<Integer> nodes = graph.getVertexes();

      shortest = new Graph.VertexPath[nodes.size()][nodes.size()];

      for (int from : nodes) {
        Set<Graph.Edge<Integer>> edges = graph.getEdges(from);
        for (Graph.Edge<Integer> e : edges) {
          shortest[e.getFrom()][e.getTo()] = new Graph.EfficientVertexPath<>(e);
        }
        shortest[from][from] = new Graph.EfficientVertexPath<>(from);
      }

      for (int relay : nodes) {
        for (int from : nodes) {
          for (int dest : nodes) {
            Graph.VertexPath<Integer> pathA = shortest[from][relay];
            Graph.VertexPath<Integer> pathB = shortest[relay][dest];
            if (pathA != null && pathB != null) {
              if (shortest[from][dest] == null
                  || pathA.getWeight() + pathB.getWeight() < shortest[from][dest]
                  .getWeight()) {
                shortest[from][dest] = pathA.append(pathB);
              }
            }
          }
        }
      }
    }

    @Override
    public Graph.VertexPath<Integer> path(Integer begin, Integer end) {
      return shortest[begin][end];
    }
  }

  private static abstract class IntVertexGraph implements Graph<Integer> {

  }

  private static interface Graph<V> {

    static class Edge<V> {

      public Edge(V from, V to, long weight) {
        this.from = from;
        this.to = to;
        this.weight = weight;
      }

      private final V from;

      private final V to;
      private final long weight;

      V getFrom() {
        return from;
      }

      V getTo() {
        return to;
      }

      long getWeight() {
        return weight;
      }

      @Override
      public boolean equals(Object o) {
        if (this == o) {
          return true;
        }
        if (o == null || getClass() != o.getClass()) {
          return false;
        }
        Edge<?> edge = (Edge<?>) o;
        return weight == edge.weight &&
            Objects.equals(from, edge.from) &&
            Objects.equals(to, edge.to);
      }

      @Override
      public int hashCode() {
        return Objects.hash(from, to, weight);
      }
    }

    static class ConstantWeightEdge<V> extends Edge<V> {

      public ConstantWeightEdge(V from, V to) {
        super(from, to, 1);
      }
    }

    Set<V> getVertexes();

    Set<Edge<V>> getEdges(V from);

    static interface VertexPath<V> {

      V getBegin();

      V getEnd();

      long getWeight();

      VertexPath<V> append(VertexPath<V> other);

      VertexPath<V> append(Edge<V> edge);
    }

    static class EfficientVertexPath<V> implements VertexPath<V> {

      final V begin;
      final V end;
      final long weight;

      public EfficientVertexPath(V begin) {
        this.begin = begin;
        this.end = begin;
        this.weight = 0;
      }

      public EfficientVertexPath(V begin, V end, long weight) {
        this.begin = begin;
        this.end = end;
        this.weight = weight;
      }

      public EfficientVertexPath(Edge<V> edge) {
        this.begin = edge.getFrom();
        this.end = edge.getTo();
        this.weight = edge.getWeight();
      }

      private EfficientVertexPath(VertexPath<V> path, Edge<V> append) {
        this.begin = path.getBegin();
        if (!path.getEnd().equals(append.getFrom())) {
          throw new IllegalStateException("not correct edge.");
        }
        this.end = append.getTo();
        this.weight = path.getWeight() + append.getWeight();
      }

      private EfficientVertexPath(VertexPath<V> pathA, VertexPath<V> pathB) {
        this.begin = pathA.getBegin();
        if (!pathA.getEnd().equals(pathB.getBegin())) {
          throw new IllegalStateException("not correct edge.");
        }
        this.end = pathB.getEnd();
        this.weight = pathA.getWeight() + pathB.getWeight();
      }

      @Override
      public V getBegin() {
        return begin;
      }

      @Override
      public V getEnd() {
        return end;
      }

      @Override
      public long getWeight() {
        return weight;
      }

      @Override
      public VertexPath<V> append(VertexPath<V> other) {
        return new EfficientVertexPath<>(this, other);
      }

      @Override
      public VertexPath<V> append(Edge<V> edge) {
        return new EfficientVertexPath<>(this, edge);
      }

      @Override
      public boolean equals(Object o) {
        if (this == o) {
          return true;
        }
        if (o == null || getClass() != o.getClass()) {
          return false;
        }
        EfficientVertexPath<?> that = (EfficientVertexPath<?>) o;
        return weight == that.weight &&
            Objects.equals(begin, that.begin) &&
            Objects.equals(end, that.end);
      }

      @Override
      public int hashCode() {
        return Objects.hash(begin, end, weight);
      }
    }
  }

  private static class FermatCombination {

    private long fact[];
    private long mod;

    public FermatCombination(int size, long mod) {
      this.fact = new long[size + 1];
      this.mod = mod;

      this.fact[0] = 1;

      for (int i = 1; i <= size; i++) {
        fact[i] = (fact[i - 1] * i) % mod;
      }
    }

    private long factorial(int n) {
      return fact[n];
    }

    private long inverse(long n) {
      return pow(n, mod - 2) % mod;
    }

    private long pow(long x, long n) {
      long ans = 1;
      while (n > 0) {
        if ((n & 1) == 1) {
          ans = ans * x % mod;
        }
        x = x * x % mod;
        n >>= 1;
      }
      return ans;
    }

    long combination(int n, int k) {
      long ans = 1;
      ans *= factorial(n);
      ans %= mod;
      ans *= inverse(factorial(n - k));
      ans %= mod;
      ans *= inverse(factorial(k));
      ans %= mod;
      return ans;
    }
  }

  private static class Scanner {

    private final InputStream is;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;

    Scanner(InputStream is) {
      this.is = is;
    }

    private boolean hasNextByte() {
      if (ptr < buflen) {
        return true;
      } else {
        ptr = 0;
        try {
          buflen = is.read(buffer);
        } catch (IOException e) {
          e.printStackTrace();
        }
        if (buflen <= 0) {
          return false;
        }
      }
      return true;
    }

    private int readByte() {
      if (hasNextByte()) {
        return buffer[ptr++];
      } else {
        return -1;
      }
    }

    private static boolean isPrintableChar(int c) {
      return 33 <= c && c <= 126;
    }

    public boolean hasNext() {
      while (hasNextByte() && !isPrintableChar(buffer[ptr])) {
        ptr++;
      }
      return hasNextByte();
    }

    public String next() {
      if (!hasNext()) {
        throw new NoSuchElementException();
      }
      StringBuilder sb = new StringBuilder();
      int b = readByte();
      while (isPrintableChar(b)) {
        sb.appendCodePoint(b);
        b = readByte();
      }
      return sb.toString();
    }

    public long nextLong() {
      if (!hasNext()) {
        throw new NoSuchElementException();
      }
      long n = 0;
      boolean minus = false;
      int b = readByte();
      if (b == '-') {
        minus = true;
        b = readByte();
      }
      if (b < '0' || '9' < b) {
        throw new NumberFormatException();
      }
      while (true) {
        if ('0' <= b && b <= '9') {
          n *= 10;
          n += b - '0';
        } else if (b == -1 || !isPrintableChar(b)) {
          return minus ? -n : n;
        } else {
          throw new NumberFormatException();
        }
        b = readByte();
      }
    }

    public int nextInt() {
      long nl = nextLong();
      if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) {
        throw new NumberFormatException();
      }
      return (int) nl;
    }

    public double nextDouble() {
      return Double.parseDouble(next());
    }
  }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args) throws Exception {
    	Scanner sc = new Scanner(System.in);
    	int N = sc.nextInt();
    	int R = sc.nextInt();
    	if (N >=10) {
    		System.out.println(R);
    	}
    	else {
    		int inner = R + (100*(10-N));
    		System.out.println(inner);
    	}

    		}
    }

class Pair
{
	long x;
	long y;

	public Pair(long x,long y) {
		this.x=x;
		this.y=y;

	}
}

class Scanner
{
	StringTokenizer st;
	BufferedReader br;

	public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

	public String next() throws IOException
	{
		while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}

	public int nextInt() throws IOException {return Integer.parseInt(next());}

	public long nextLong() throws IOException {return Long.parseLong(next());}

	public String nextLine() throws IOException {return br.readLine();}

	public double nextDouble() throws IOException
	{
		String x = next();
		StringBuilder sb = new StringBuilder("0");
		double res = 0, f = 1;
		boolean dec = false, neg = false;
		int start = 0;
		if(x.charAt(0) == '-')
		{
			neg = true;
			start++;
		}
		for(int i = start; i < x.length(); i++)
			if(x.charAt(i) == '.')
			{
				res = Long.parseLong(sb.toString());
				sb = new StringBuilder("0");
				dec = true;
			}
			else
			{
				sb.append(x.charAt(i));
				if(dec)
					f *= 10;
			}
		res += Long.parseLong(sb.toString()) / f;
		return res * (neg?-1:1);
	}

	public boolean ready() throws IOException {return br.ready();}
}


import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
            int N=sc.nextInt();
            int X[] =new int[N];
            int total=0;
            for(int i=0;i<N;i++){
                X[i]=sc.nextInt();
                total+=X[i];
            }
            long C = Math.round((double)total/N);
            int ans=0;

            for(int j=0;j<N;j++){
                ans += Math.pow(X[j]-C, 2);
            }

        System.out.println(ans);
    }
}


import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		bigdecimal N = sc.nextInt();
		bigdecimal K = sc.nextInt();
		bigdecimal count = 1;
		while (N >= K) {
			N = N / K;
			count++;
		}
		System.out.println(count);
		return ;
	}
}


import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		float N = sc.nextInt();
		float K = sc.nextInt();
		float count = 1;
		while (N >= K) {
			N = N / K;
			count++;
		}
		System.out.println(count);
		return ;
	}
}


#include<cstdio>
using namespace std;
int main(){
	int a,b;
	scanf("%d%d",&a,&b);
	if(a>10){
	 printf("%d",b);
	 return 0;
}
else {
	b+=100*(10-a);
	printf("%d",b);
}
return 0;
}


#include<cstdio>
using namespace std;
int K,N;
int main(){
	scanf("%d%d",&K,&N);
	if(K<10){
		N=N+100*(10-K);
	}
	printf("%d\n",N);
	return 0;
}


#include<stdio.h>
//#include <stdlib.h>
//#include<string.h>
using namespace std;
int main()
{
    int N,R;
    scanf("%d %d", &N, &R);
    if(N<10){
        printf("%d", (10-N)*100+R);
    }
    else{
        printf("%d", R);
    }
    return 0;
}


#include<bits/stdc++.H>
using namespace std;
int main()
{
   int n,r;
   cin>>n>>r;
   if(n<10)
   cout<<r+100*(10-n);
   else
   {cout<<r;
   }

}


#include <stdio.h>

int main()
{
    int N,R,hasil;

    scanf("%d %d", &N, &R);
    if (N<10){
        hasil += R + 100 * (10 - N)
    }
    else{
        hasil= R;
    }
    printf("%d",hasil);

    return 0;
}


#include <stdio.h>

int main()
{
    int N,R,hasil;

    scanf("%d %d", &N, &R);
    if (N<10){
        hasil  100*(10-N);
        hasil - R + hasil;
    }
    else{
        hasil= R;
    }
    printf("%d",hasil);

    return 0;
}


#include <stdio.h>

int main(){
	int n, r;
	if(scanf("%d %d", &n,&r)==EOF){return 0;}
	if(n >= 10){printf("%d\n", r);}
	else{printf("%d\n", r + 100*(10 - n));}
	return 0;
}


#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <limits.h>

int main(void) {
	int n, r;

	scanf("%d %d", &n, &r);
	if (n >= 10) printf("%d", r);
	else printf("%d", r + 100 * (10 - n));
	return 0;
}


#include <stdio.h>

int main() {
	int N, R;
	scanf("%d%d",&N,&R);
	if (N>=10) {
		printf("%d",R);
	}
	else {
		printf("%d",R+100*(10-N));
	}
	return 0;
}


#include <stdio.h>

int main () {
	int a, b;
	scanf ("%d %d", &a, &b);
	b += (10-a) * 100;
	printf ("%d\n", b);
}


#include<stdio.h>

int main(){
int N;
scanf ("%d",&N);
long long int A[100];
long long int B = 1;
long long int x = 1000000000000000000;
for (int i = 0; i < N; i++ ){
scanf ("%lld",&A[i]);
if (A[i]==0){
	printf ("0\n");
	return 0;
}
}

for (int i = 0; i< N; i++){
	x= x/ A[i];
	if (x==0){
		printf ("-1\n");
		return 0;
}
	else{
	B= B * A[i];
}
}
printf ("%lld",B);
return 0;
}


#include<stdio.h>

int main(){
int N;
scanf ("%d",&N);
long long int A[N]{};
long long int B = 1;
long long int x = 1000000000000000000;
for (int i = 0; i < N; i++ ){
scanf ("%lld",&A[i]);
if (A[i]==0){
	printf ("0\n");
	return 0;
}
}

for (int i = 0; i< N; i++){
	x= x/ A[i];
	if (x==0){
		printf ("-1\n");
		return 0;
}
	else{
	B= B * A[i];
}
}
printf ("%lld",B);
return 0;
}


"use strict";
main(
  require("fs")
    .readFileSync("/dev/stdin", "UTF-8")
    .trim()
    .split("\n")
);

function main(input) {
  input = input[0].split(" ").map(Number);

  if (input[0] >= 10) {
    console.log(input[1]);
  } else {
    console.log(input[1] + 100 * (10 - input[0]));
  }
}


(function Main(input){var input=input.split(' '),N=input[0]-0,R=input[1]-0;console.log(N>=10?R:R+100*(10-N))})(require("fs").readFileSync("/dev/stdin","utf8"));


const main = stdin => {
  const [N, R] = stdin.trim().split(' ').map(x => parseInt(x))
  if (N >= 10) {
    console.log(N)
  } else {
    console.log(R + 100 * (10 - N))
  }
}

// 標準入力
main(require("fs").readFileSync("/dev/stdin", "utf8"))


n = -1
r < -1
while n<1 || 100<n || r<0 || 4111<r
n = gets.to_i
r = gets.to_i
end

if n >= 10
	puts r
   else
    puts r-(10-n)
end


function main(input) {
  var args = input.split(' ');
  var n = parseInt(args[0], 10);
  var r = parseInt(args[1], 10);
  var hiddenRating;
  if ( n >= 10) {
    hiddenRating = r;
  } else {
    var argument = 100*(10 - n);
    hiddenRating = r + argument;
  }
  return hiddenRating;
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var stdInScanner = bufio.NewScanner(os.Stdin)

func nextInt() int {
	stdInScanner.Scan()
	i, _ := strconv.Atoi(stdInScanner.Text())
	return i
}

func main() {
	stdInScanner.Split(bufio.ScanWords)

	N := nextInt()
	R := nextInt()

	if N >= 10 {
		fmt.Println(R)
	} else {
		fmt.Println(R + (100 * (10 - N)))
	}
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

func out(x ...interface{}) {
	fmt.Println(x...)
}

var sc = bufio.NewScanner(os.Stdin)

func getInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func getString() string {
	sc.Scan()
	return sc.Text()
}

// min, max, asub, absなど基本関数
func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func asub(a, b int) int {
	if a > b {
		return a - b
	}
	return b - a
}

func abs(a int) int {
	if a >= 0 {
		return a
	}
	return -a
}

func lowerBound(a []int, x int) int {
	idx := sort.Search(len(a), func(i int) bool {
		return a[i] >= x
	})
	return idx
}

func upperBound(a []int, x int) int {
	idx := sort.Search(len(a), func(i int) bool {
		return a[i] > x
	})
	return idx
}

func main() {
	sc.Split(bufio.ScanWords)

	N, R := getInt(), getInt()
	if N >= 10 {
		out(R)
		return
	}
	out(R + 100*(10-N))
}


package main

import (
	"fmt"
)

func main() {
	var n, r int
	fmt.Scan(&n, &r)

	var ans int
	if n >= 10 {
		ans = r
	} else {
		ans = r + (100*(10-n))
	}

	fmt.Println(ans)
}


package main

import "fmt"

func main() {
	var n, r int
	fmt.Scan(&n, &r)

	if n >= 10 {
		fmt.Println(r)
	} else {
		fmt.Println(r - 100*(10-n))
	}
}


package main

import "fmt"

func main() {
	var n, r int
	fmt.Scan(&n, &r)

	if n >= 10 {
		fmt.Println(r)
	} else {
		fmt.Println(100 * (10 - n))
	}
}


package main

import (
	"bufio"
	"fmt"
	"log"
	"os"
	"strconv"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)

	scanner.Split(bufio.ScanWords)

	scanner.Scan()
	N, err := strconv.Atoi(scanner.Text())
	if err != nil {
		log.Fatal(err)
	}

	scanner.Scan()
	R, err := strconv.Atoi(scanner.Text())
	if err != nil {
		log.Fatal(err)
	}

	if N >= 10 {
		fmt.Println(N)
	} else {
		fmt.Println(R + (100 * (10 - N)))
	}
}


N, R = gets.split.map(&:to_i)
p R + 100 * [10-N, 0].max


n, r = gets.split.map(&:to_i)

s = 100 * ( 10 - n)

if n >= 10
  puts r
else
  puts r + s
end


n, r = *gets.split(" ").map(&:chomp).map(&:to_i)
n > 10 ? puts(r) : puts(r + 100 * (10 - n))


n, r = gets.split.map(&:to_i)
puts r + (n>=0 ? 0 : 100*(10-n))


n,r = gets.chomp.split(" ").map(&:to_i)
if n >=10
  puts r
else
  puts (100(10-n)) + r
end


n,r = gets.chomp.split(" ").map(&:to_i)
if n >=10
  puts r
else
  puts 100(10-n) + r
end


/* {{{ */
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};
    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };
    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };
    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };
    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };
    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}
/* }}} */

fn main() {
    input! {
        n: u32,
        r: u32
    }
    if n < 10 {
        println!("{}", r + (100 * (10 - n)));
    } else {
        println!("{}", r);
    }
}
/* vim:set foldmethod=marker: */


use std::io;

fn main() {
	let mut buf = String::new();
	io::stdin().read_line(&mut buf).expect("");
	let mut iter = buf.split_whitespace();
	let n: i32 = match iter.next().unwrap().parse(){
		Ok(n) => n,
		Err(_) => panic!(""),
	};
	let r: i32 = match iter.next().unwrap().parse() {
		Ok(n) => n,
		Err(_) => panic!(""),
	};
	if n >= 10 {
		println!("{}", r);
	}else{
		let p = r+100*(10-n);
		println!("{}", p);
	}
}


#![allow(unused, non_snake_case, dead_code, non_upper_case_globals)]
use std::cmp::*;
use std::collections::*;
use std::mem::*;

fn main() {
    let (r, w, e) = (std::io::stdin(), std::io::stdout(), std::io::stderr());
    let mut io = IO::new(r.lock(), w.lock(), e.lock());
    let (n, r): (usize, usize) = (io.read(), io.read());

    if n >= 10 {
        io.writeln(r);
    } else {
        // r:表示
        // x :内部
        // x - 100*(10-n) = r
        io.writeln(r + 100 * (10 - n));
    }
}

static MOD: i64 = 1000000007;
// IO
use std::io::*;
struct IO<R: Read, W: Write, E: Write> {
    Read: R,
    Write: BufWriter<W>,
    Error: BufWriter<E>,
}
impl<R: Read, W: Write, E: Write> IO<R, W, E> {
    fn new(r: R, w: W, e: E) -> IO<R, W, E> {
        IO {
            Read: r,
            Write: BufWriter::new(w),
            Error: BufWriter::new(e),
        }
    }
    fn read<T>(&mut self) -> T
    where
        T: std::str::FromStr,
    {
        let next: String = self
            .Read
            .by_ref()
            .bytes()
            .map(|c| c.unwrap() as char)
            .skip_while(|c| c.is_whitespace())
            .take_while(|c| !c.is_whitespace())
            .collect();
        next.parse().ok().unwrap()
    }
    fn chars(&mut self) -> Vec<char> {
        self.read::<String>().chars().collect()
    }
    fn readn<T: std::str::FromStr>(&mut self, n: usize) -> Vec<T> {
        (0..n).map(|_| self.read::<T>()).collect::<Vec<_>>()
    }
    fn readmat<T: std::str::FromStr>(&mut self, n: usize, m: usize) -> Vec<Vec<T>> {
        (0..n).map(|_| self.readn(m)).collect()
    }
    fn write<S: ToString>(&mut self, val: S) {
        self.Write.write(val.to_string().as_bytes());
    }
    fn writeln<S: ToString>(&mut self, val: S) {
        self.Write.write(val.to_string().as_bytes());
        self.Write.write(b"\n");
    }
    fn debug<S: std::fmt::Debug>(&mut self, val: S) {
        writeln!(self.Error, "(debug) {:?}", &val);
    }
    fn debug2<S: std::fmt::Debug, T: std::fmt::Debug>(&mut self, val1: S, val2: T) {
        writeln!(self.Error, "(debug2) {:?} -> {:?}", val1, val2);
    }
    fn debug3<S: std::fmt::Debug, T: std::fmt::Debug, U: std::fmt::Debug>(
        &mut self,
        val1: S,
        val2: T,
        val3: U,
    ) {
        writeln!(
            self.Error,
            "(debug3) {:?} -> {:?} -> {:?}",
            val1, val2, val3
        );
    }
}


#[macro_use]
extern crate lib;

fn main() {
    lib::input!{n: u32, r: u32}

    let rate = match n {
        1..=10 => r + 100 * (10 - n),
        _ => r,
    };

    println!("{}", rate);
}


use std::io::stdin;

fn main() {
    let line = String::new();
    stdin().read_line(&mut line).unwrap();

    let words: Vec<i64> = line
        .split_whitespace()
        .map(|x| x.parse().unwrap())
        .collect();

    let n = words[0];
    let r = words[1];

    if n >= 10 {
        println!("{}", r);
    } else {
        println!("{}", r + 100 * (10 - n))
    }
}


use std::io::stdin;

fn main() {
    let line = String::new();
    stdin().read_line(&mut line).unwrap();

    let words = line
        .split_whitespace()
        .map(|x| x.parse().unwrap())
        .collect()

    let n = words[0];
    let r = words[1];

    if n >= 10 {
        println!("{}", r);
    } else {
        println!("{}", r + 100 * (10 - n))
    }
}


func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func main() {
    let line = readInts()
    let n = line[0]
    let r = line[1]

    if n >= 10 {
        print(r)
    } else {
        print(r + 100 * (10 - n))
    }
}

main()


import Foundation

let split = readLine()!.componentsSeparatedByString(" ")
let N = Int(split[0])!
let R = Int(split[1])!

if (N < 10) {
  print(R + (100 * (10 - N)))
} else {
  print(R)
}


import Foundation

let input_line: String = readLine()!
let split: [String] = input_line.components(separatedBy: " ")

let N = Int(split[0])!
let R = Int(split[1])!

if (N <= 10){
    print(R+100*(10-N))
}else{
    print(R)
}


import Foundation

let input_line: String = readLine()!
let split: [String] = input_line.components(separatedBy: " ")

let N = Int(split[0])!
let R = Int(split[1])!

if (N >= 10){
    print(R+100*(10-N))
}else{
    print(R)
}


import * as fs from 'fs';

//in
// 2 2919
//out
// 3719
const main = (inp: string) => {
    // 100 * (10-k)
    const [n, r]: number[] = inp.split(' ').map(Number);
    if (r === 0) {
        console.log(0);
    } else if (n >= 10) {
        console.log(r);
    } else {
        console.log(r + (100 * (10 - n)));
    }
};

main(fs.readFileSync('/dev/stdin', 'utf8').trim());


    function Main(inputString) {
    	// 1行目がinput[0], 2行目がinput[1], …に入る
    	let inputArray = inputString.split(" ");
    	//文字列から10進数に変換するときはparseIntを使います
    	let executeCount = parseInt(inputArray[0], 10);
    	let displayRating = parseInt(inputArray[1], 10);
        let innerRating = 0;

        // 10回未満なら表示レーティング+100*(1-参加回数)
        // 10回以上なら表示レーティング

        if(executeCount >= 10){
            innerRating = displayRating;
        } else {
            innerRating = displayRating + (100 * ( 10 - executeCount ));
        }

    	//出力
    	console.log('%d', innerRating);
    }
 Main(require("fs").readFileSync("/dev/stdin", "utf8"));


class NormalInput {
  input: string[];
  pointer: number;
  constructor(raw: string) {
    this.input = raw.split(/ |\n/);
    this.pointer = 0;
  }
  int = (): number => {
    const ret = parseInt(this.input[this.pointer], 10);
    this.pointer++;
    return ret;
  };
  str = (): string => {
    const ret = this.input[this.pointer];
    this.pointer++;
    return ret;
  };
  strs = (length: number): string[] => {
    let ret: string[] = [];
    for (let i = 0; i < length; i++) {
      ret.push(this.str());
    }
    return ret;
  };
  ints = (length: number): number[] => {
    let ret: number[] = [];
    for (let i = 0; i < length; i++) {
      ret.push(this.int());
    }
    return ret;
  };
}

function Main({ int, str, strs, ints }: NormalInput) {
  const N = int();
  const R = int();
  console.log(N>=10?R:R+100*(10-N));
}

//DO NOT EDIT
Main(new NormalInput(require("fs").readFileSync("/dev/stdin", "utf8")));


class AtCoder {
  // 入力系
  input=require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/);
  input_i=-1;

  n(){
    this.input_i++;
    return Number(this.input[this.input_i]);
  }
  nn(n:number):number[]{
    const a=[];
    for(let i=0;i<n;i++){
      a.push(this.n());
    }
    return a;
  }
  s(){
    this.input_i++;
    return String(this.input[this.input_i]);
  }
  ss(n:number):string[]{
    const a=[];
    for(let i=0;i<n;i++){
      a.push(this.s());
    }
    return a;
  }

  // コンソール
  o(...a:any){
    console.log(...a);
  }

  // Math
  abs(a:number){
    return Math.abs(a);
  }
  min(...a:number[]){
    return Math.min(...a);
  }
  max(...a:number[]){
    return Math.max(...a);
  }
  floor(a:number){
    return Math.floor(a);
  }
  ceil(a:number){
    return Math.ceil(a);
  }
  round(a:number){
    return Math.round(a);
  }

  // ソート
  asc(ar:number[]){
    const t=[...ar];
    ar.sort((a,b)=>{return a-b});
  }
  desc(ar:number[]){
    const t=[...ar];
    ar.sort((a,b)=>{return b-a});
  }

  // 自作
  gcd(...arr:number[]):number{
    for(let i=0;i<arr.length-1;i++){
      let [x,y]=[arr[i],arr[i+1]];
      while(y){
        [x,y]=[y,x%y];
      }
      arr[i+1]=x;
    }
    return arr[arr.length-1];
  };
  lcm(...arr:number[]):number{
    for(let i=0;i<arr.length-1;i++){
      let [x,y]=[arr[i],arr[i+1]];
      while(y){
        [x,y]=[y,x%y];
      }
      arr[i+1]=arr[i]*arr[i+1]/x;
    }
    return arr[arr.length-1];
  };
  isPrime(n:number):boolean{
    if(n < 2) return false;
    const suq=Math.sqrt(n);
    for(let i=2;i<=suq;i++){
      if(n%i==0){
        return false;
      }
    }return true;
  };
  deduplicate(a:any[]):any[]{
    return Array.from(new Set(a));
  };
  f(roop:number, callback:any){
    for(let i=0;i<roop;i++){
      callback(i);
    }
  };
  Yes(){
    console.log('Yes');
  }
  No(){
    console.log('No');
  }
  YES(){
    console.log('YES');
  }
  NO(){
    console.log('NO');
  }
}
const m = () => {
  const o = new AtCoder();
  let [n, r] = o.nn(2);
  if(n>=10){
    o.o(r);
  }else{
    o.o(r-100*(10-n));
  }
}
m();


// 内部レーティングの求め方
// 参加回数10回未満なら表示レーティング+100*(1-参加回数)

// 参加回数10回以上なら表示レーティングと等しい

    // inputに入力データ全体が入る
    // 実行回数 内部レーティング
    function Main(inputString) {
    	// 1行目がinput[0], 2行目がinput[1], …に入る
    	let inputArray = inputString.split(" ");
    	//文字列から10進数に変換するときはparseIntを使います
    	let executeCount = parseInt(inputArray[0], 10);
    	let displayRating = parseInt(inputArray[1], 10);
        let innerRating = 0;

        // 10回未満なら表示レーティング+100*(1-参加回数)
        // 10回以上なら表示レーティング

        if(executeCount >= 10){
            innerRating = displayRating;
        } else {
            innerRating = displayRating + (100 * executeCount);
        }

    	//出力
    	console.log('%d', innerRating);
    }
        //*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
       Main(require("fs").readFileSync("/dev/stdin", "utf8"));


print(7-["SUN","MON","TUE","WED","THU","FRI","SAT"].index(input()))


a = input()

dow = {
  "SUN":7,
  "MON":6,
  "TUE":5,
  "WED":4,
  "THU":3,
  "FRI":2,
  "SAT":1
}
print(dow[a])


s = input()
w = {'SUN':7, 'MON':6, 'TUE':5, 'WED':4, 'THU':3,
      'FRI':2, 'SAT':1}
print(w[s])


s = input()

if s == 'SAT':
    print(1)
if s == 'FRY':
    print(2)
if s == 'THU':
    print(3)
if s == 'WED':
    print(4)
if s == 'TUE':
    print(5)
if s == 'MON':
    print(6)
if s == 'SUN':
    print(7)


S=input()
if S=="SUN":
    print("MON")
elif S=="MON":
    print("TUE")
elif S=="TUE":
    print("WED")
elif S=="WED":
    print("THU")
elif S=="THU":
    print("FRI")
elif S=="FRI":
    print("SAT")
elif S=="SAT":
    print("SUN")


S = input()
week = ["SUN","MON", "TUE", "WED", "THU", "FRI", "SAT"]
for i in week:
  if week[i] == S:
    print(7 - i)


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) {
      String str = "";
      BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

        try {
            str = reader.readLine();
            reader.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
      switch (str) {
       case "SUN":
           System.out.println("7");
          break;
       case "MON":
           System.out.println("6");
          break;
       case "TUE":
           System.out.println("5");
          break;
       case "WED":
           System.out.println("4");
          break;
       case "THU":
           System.out.println("3");
          break;
       case "FRI":
           System.out.println("2");
          break;
       case "SAT":
           System.out.println("1");
          break;
        default:
          break;
     }
}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str = br.readLine();

		switch (str) {
		case "SUN":
			System.out.println(7);
			break;
		case "MON":
			System.out.println(6);
			break;
		case "TUE":
			System.out.println(5);
			break;
		case "WED":
			System.out.println(4);
			break;
		case "THU":
			System.out.println(3);
			break;
		case "FRI":
			System.out.println(2);
			break;
		case "SAT":
			System.out.println(1);
			break;
		}
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str = br.readLine();

		switch (str) {
		case "SUN":
			System.out.println("7");
			break;
		case "MON":
			System.out.println("6");
			break;
		case "TUE":
			System.out.println("5");
			break;
		case "WED":
			System.out.println("4");
			break;
		case "THU":
			System.out.println("3");
			break;
		case "FRI":
			System.out.println("2");
			break;
		case "SAT":
			System.out.println("1");
			break;
		}
	}
}


import java.util.*;

class solution{
	public static void main(String args[]){
    	Scanner sc = new Scanner(System.in);
      	String str = sc.nextLine();

      	if(str.equals("SUN"))
          System.out.println(7);
      	else if(str.equals("MON"))
          System.out.println(6);
      	else if(str.equals("TUE"))
          System.out.println(5);
      	else if(str.equals("WED"))
          System.out.println(4);
      	else if(str.equals("THU"))
          System.out.println(3);
      	else if(str.equals("FRI"))
          System.out.println(2);
      	else if(str.equals("SAT"))
          System.out.println(1);
    }
}


class solution{
	public static void main(String args[]){
    	Scanner sc = new Scanner(System.in);
      	String str = sc.nextLine();

      	if(str.equals("SUN"))
          System.out.println(7);
      	else if(str.equals("MON"))
          System.out.println(6);
      	else if(str.equals("TUE"))
          System.out.println(5);
      	else if(str.equals("WED"))
          System.out.println(4);
      	else if(str.equals("THU"))
          System.out.println(3);
      	else if(str.equals("FRI"))
          System.out.println(2);
      	else if(str.equals("SAT"))
          System.out.println(1);
    }
}


class solution{
	public static void main(String args[]){
    	Scanner sc = new Scanner(System.in);
      	String str = sc.nextLine();

      	if(str.equals("SUN"))
          System.out.println(7);
      	elseif(str.equals("MON"))
          System.out.println(6);
      	else if(str.equals("TUE"))
          System.out.println(5);
      	else if(str.equals("WED"))
          System.out.println(4);
      	else if(str.equals("THU"))
          System.out.println(3);
      	else if(str.equals("FRI"))
          System.out.println(2);
      	else if(str.equals("SAT"))
          System.out.println(1);
    }
}


#include <stdio.h>
#include <string.h>

int main()
{
	char str[10];
	scanf("%s",str);
	if(strcmp(str,"SUN")==0)
	{
		printf("7");
	}
	if(strcmp(str,"MON")==0)
	{
		printf("6");
	}
	if(strcmp(str,"TUE")==0)
	{
		printf("5");
	}
	if(strcmp(str,"WED")==0)
	{
		printf("4");
	}
	if(strcmp(str,"THU")==0)
	{
		printf("3");
	}
	if(strcmp(str,"FRI")==0)
	{
		printf("2");
	}
	if(strcmp(str,"SAT")==0)
	{
		printf("1");
	}
}


#include<cstdio>

using namespace std;

int main(){
    char s[4];
    scanf("%s", s);
    if (s[0] == 'S' && s[1] == 'U') puts("7");
    else if (s[0] == 'M' && s[1] == 'O') puts("6");
    else if (s[0] == 'T' && s[1] == 'U') puts("5");
    else if (s[0] == 'W' && s[1] == 'E') puts("4");
    else if (s[0] == 'T' && s[1] == 'H') puts("3");
    else if (s[0] == 'F' && s[1] == 'R') puts("2");
    else if (s[0] == 'S' && s[1] == 'A') puts("1");
}


#include <stdio.h>

int main(){

  char uno,dos,tres;

  scanf("%c%c%c",&uno,&dos,&tres);

  if(uno=='S' && dos=='U' && tres=='N')
    printf("7");

  if(uno=='M' && dos=='O' && tres=='N')
    printf("6");

  if(uno=='T' && dos=='U' && tres=='E')
    printf("5");

  if(uno=='W' && dos=='E' && tres=='D')
    printf("4");

  if(uno=='T' && dos=='H' && tres=='U')
    printf("3");

  if(uno=='F' && dos=='R' && tres=='I')
    printf("2");

  if(uno=='S' && dos=='A' && tres=='T')
    printf("1");

}


#include <bits/stdc++.h>
using namespace std;
int N,M;

vector<int> solve(){
	cin>>N>>M;
	char s[N+2];
	vector<int> prev(N+1,-1);
	cin>>s;
	vector<int> nn;
	vector<int> n1;
	nn.push_back(-1);
	if(s[0]=='1') return nn;
	if(N==1) return n1;
	if(s[N]=='1') return nn;
	prev[0] = 0;
	int a = 0;
	for(int j = 1; j<=N;j++){
		if(s[j]=='1') continue;
		int st = j-a;
		if(st>M){
			int found = 0;
			for(int q = j-M;q<j;q++){
				if(s[q]=='0'){
					a = q;
					found = 1;
					break;
				}
			}
			if(!found){
				return nn;
			}
		}
	    prev[j] = a;
	}
	vector<int> numbers;
	int sta = N;
	while(sta!=0){
		numbers.push_back(sta-prev[sta]);
		sta = prev[sta];
	}

	return numbers;

}
int main(){
   vector<int> x = solve();
   for(int j = x.size()-1;j>=0;j--){
   	 cout<<x[j]<<" ";
   }

}


#include <bits/stdc++.h>
using namespace std;

const int INF = 100100100;
const int MOD = (int)1e9 + 7;
typedef long long ll;
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) for (int i = 0; i < (n); ++i)

int main() {
  string a,b;
  cin >> a;
  int ans = 7;
  vector<string> vec = {"MON","TUE","WED","THU","FRI","SAT"};
  REP(i,6)if(vec[i] == a) ans = 6-i;
  cout << ans << endl;
}


#include <iostream>
using namespace std;

int main(){
    //入力を受け取る
    int S;
    cin >> S;

  if (S == "SUN") {
    cout << 7 << endl;
  }
  else if (S == "MON") {
    cout << 6 << endl;
  }
  else if (S == "TUE") {
    cout << 5 << endl;
  }
  else if (S == "WED") {
    cout << 4 << endl;
  }
  else if (S == "THU") {
    cout << 3 << endl;
  }
  else if (S == "FRI") {
    cout << 2 << endl;
  }
  else if (S == "SAT") {
    cout << 1 << endl;
  }
}


#include <stdio.h>
#include <string.h>

int main(){
  char A[9][4]={"A","SAT","FRI","THU","WED","TUE","MON","SUN"};
  char S[4];
  scanf("%s",S);
  int ans=1;
  while(strcmp(S,A[ans])!=0) ans++;

  printf("%d\n",ans);
  return 0;
}


#include <stdio.h>
int main(void){
	char a[4];
	scanf("%s",a);
	if(a[0]=='S'){
		if(a[1]=='A'){
			printf("1\n");
		}else{
			printf("7\n");
		}
	}else if(a[0]=='T'){
		if(a[1]=='U'){
			printf("5\n");
		}else{
			printf("3\n");
		}
	}else if(a[0]=='M'){
		printf("6\n");
	}else if(a[0]=='W'){
		printf("4\n");
	}else{
		printf("2\n");
	}
	return 0;
}


#include <stdio.h>
int main(void)
{
    char S[3];
    int n = 0;
    scanf("%s", &S);
    if (S[0] == 'M')
        n = 6;
    else if (S[0] == 'W')
        n = 4;
    else if (S[0] == 'F')
        n = 2;
    else if (S[0] == 'S')
    {
        if (S[1] == 'U')
            n = 7;
        else
            n = 1;
    }
    else
    {
        if (S[1] == 'U')
            n = 5;
        else
            n = 3;
    }
    printf("%d", n);
    return 0;
}


#include <stdio.h>

int main(void)
{
  /* 変数の定義 */
  char dayotWeek[8];
  int day_count_util_sudday;

  /* 文字列の入力 */
  scanf("%s", &dayotWeek);
  if("SUN" == dayotWeek){
    day_count_util_sudday = 0;
  }else if("MON" == dayotWeek){
    day_count_util_sudday = 6;
  }else if("TUE" == dayotWeek){
    day_count_util_sudday = 5;
  }else if("WED" == dayotWeek){
    day_count_util_sudday = 4;
  }else if("THU" == dayotWeek){
    day_count_util_sudday = 3;
  }else if("FRI" == dayotWeek){
    day_count_util_sudday = 2;
  }else if("SAT" == dayotWeek){
    day_count_util_sudday = 1;
  }else{
    printf("入力された文字は無効です");
    return 0;
  }
  /* 文字列の出力 */
  printf("%d\n", day_count_util_sudday);
  return 0;
}


#include <stdio.h>

int main(void)
{
  /* 変数の定義 */
  char dayotWeek[8];
  int day_count_util_sudday;

  /* 文字列の入力 */
  scanf("%s", dayotWeek);
  if("SUN" == dayotWeek){
    day_count_util_sudday = 0;
  }else if("MON" == dayotWeek){
    day_count_util_sudday = 6;
  }else if("TUE" == dayotWeek){
    day_count_util_sudday = 5;
  }else if("WED" == dayotWeek){
    day_count_util_sudday = 4;
  }else if("THU" == dayotWeek){
    day_count_util_sudday = 3;
  }else if("FRI" == dayotWeek){
    day_count_util_sudday = 2;
  }else if("SAT" == dayotWeek){
    day_count_util_sudday = 1;
  }else{
    printf("入力された文字は無効です");
    return 0;
  }
  /* 文字列の出力 */
  printf("%d\n", day_count_util_sudday);
  return 0;
}


#include <stdio.h>

int main(void)
{
  /* 変数の定義 */
  char dayotWeek[1000];
  int day_count_util_sudday;

  /* 文字列の入力 */
  scanf("%[xyz]", dayotWeek);
  if("SUN" == dayotWeek){
    day_count_util_sudday = 0;
  }else if("MON" == dayotWeek){
    day_count_util_sudday = 6;
  }else if("TUE" == dayotWeek){
    day_count_util_sudday = 5;
  }else if("WED" == dayotWeek){
    day_count_util_sudday = 4;
  }else if("THU" == dayotWeek){
    day_count_util_sudday = 3;
  }else if("FRI" == dayotWeek){
    day_count_util_sudday = 2;
  }else if("SAT" == dayotWeek){
    day_count_util_sudday = 1;
  }else{
    printf("入力された文字は無効です");
    return 0;
  }
  /* 文字列の出力 */
  printf("%d\n", day_count_util_sudday);
  return 0;
}


// inputに入力データ全体が入る
function Main(input) {
	// 1行目がinput[0], 2行目がinput[1], …に入る
	input = input.split("\n");

    var a = input[0];

 // SUN,MON,TUE,WED,THU,FRI,SAT
    if (a == 'SUN'){console.log('7');}
    else if(a == 'MON'){console.log('6');}
    else if(a == 'TUE'){console.log('5');}
    else if(a =='WED'){console.log('4');}
    else if(a == 'THU'){console.log('3');}
    else if (a == 'FRI'){console.log('2');}
    else if (a == 'SAT'){console.log('1');}

}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function main(arg) {
	arg = arg.trim();
	var day = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'];
  	var out = day.indexOf(arg);
  	out = 7- out;
  console.log(out)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


function main(input){
    const args=input.split('\n');
    var array=['SAT','FRI','THU','WED','TUE','MON','SUN'];
    var ans=array.indexOf(args[0])+1;
    console.log(ans);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


/*
問題文
今日の曜日を表す文字列 S が与えられます。
S は SUN,MON,TUE,WED,THU,FRI,SAT のいずれかであり、
それぞれ日曜日、月曜日、火曜日、水曜日、木曜日、金曜日、土曜日を表します。

次の日曜日 (あす以降) が何日後か求めてください。

制約
S は SUN,MON,TUE,WED,THU,FRI,SAT のいずれか

*/

function Main(input) {
    var S = input.split('\n')

    var map = {
        "SUN":7,
        "MON":6,
        "TUE":5,
        "WED":4,
        "THU":3,
        "FRI":2,
        "SAT":1,
    }
	console.log(map.S);
}

//*編集不可。標準入出力から一度に読み込み、Mainを呼び出す
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


/*
問題文
今日の曜日を表す文字列 S が与えられます。
S は SUN,MON,TUE,WED,THU,FRI,SAT のいずれかであり、
それぞれ日曜日、月曜日、火曜日、水曜日、木曜日、金曜日、土曜日を表します。

次の日曜日 (あす以降) が何日後か求めてください。

制約
S は SUN,MON,TUE,WED,THU,FRI,SAT のいずれか

*/

function Main(input) {
    var S = input.split('\n')

    var map = {
        "SUN":7,
        "MON":6,
        "TUE":5,
        "WED":4,
        "THU":3,
        "FRI":2,
        "SAT":1,
    }
	console.log(map[S]);
}

//*編集不可。標準入出力から一度に読み込み、Mainを呼び出す
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function main(arg) {
	arg = arg.trim().split(/\n/);
  	var num = Number(arg[0]),
        word = arg[1],
        long = arg[1].length;

  	if (num != 0) {
      	var words = [],
            ary_new = [],
            out,
            out_parts,
            abc = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ';

      	for (var i = 0; i < long; i ++) {
			words.push(word[i]);
        }
        for (var i = 0; i < num; i++) {
            ary_new.push(words[i]);
            out = ary_new.reduce((all, n) => all + n)
        }
      	console.log(words[num] + abc.substr(num + 1, num) + words[num + num + 1] + out)
    } else {
      	console.log(words)
    }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	r := bufio.NewReader(os.Stdin)
	var s string
	fmt.Fscan(r, &s)

	mp := map[string]int{
		"SUN": 7,
		"MON": 6,
		"TUE": 5,
		"WED": 4,
		"THU": 3,
		"FRI": 2,
		"SAT": 1,
	}
	fmt.Println(mp[s])
}


package main

import (
	"fmt"
	"os"
)

func main() {
	var s string
	fmt.Scanf("%s", &s)

	days := []string{"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"}
	for i, d := range days {
		if s == d {
			fmt.Printf("%d\n", 7-i)
			os.Exit(0)
		}
	}
}


package main

import "fmt"

func main() {
	week := []string{"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"}
	var s string
	fmt.Scan(&s)
	for i := 0; i < len(week); i++ {
		if s == week[i] {
			fmt.Println(len(week) - i)
			return
		}
	}
}


//go:generate echo "https://atcoder.jp/contests/abc146/tasks/abc146_a"
package main

import (
	"bufio"
	"fmt"
	"io"
	"math"
	"math/big"
	"os"
	"strconv"
)

var scan = newScanner(os.Stdin)

func Solve() {
	return
}

func main() {
	s := make([][][][]int, math.MaxInt64, math.MaxInt64)
	for i := range s {
		s[i] = make([][][]int, math.MaxInt64, math.MaxInt64)
		for j := range s[i] {
			s[i][j] = make([][]int, math.MaxInt64, math.MaxInt64)
			for k := range s[i][j] {
				s[i][j][k] = make([]int, math.MaxInt64, math.MaxInt64)
			}
		}
	}
	fmt.Println(s)
}

type scanner struct {
	*bufio.Scanner
}

func newScanner(r io.Reader) *scanner {
	s := bufio.NewScanner(r)
	s.Split(bufio.ScanWords)
	s.Buffer(nil, 100000000)
	return &scanner{s}
}

func (s *scanner) String() string {
	s.Scan()
	return s.Text()
}

func (s *scanner) Strings(l int) []string {
	if l == 0 {
		return []string{}
	}
	sl := make([]string, l, l)
	for i := range sl {
		sl[i] = s.String()
	}
	return sl
}

func (s *scanner) Int() int {
	n, _ := strconv.Atoi(s.String())
	return n
}

func (s *scanner) Ints(l int) []int {
	if l == 0 {
		return []int{}
	}
	sl := make([]int, l, l)
	for i := range sl {
		sl[i] = s.Int()
	}
	return sl
}

func (s *scanner) Float64() float64 {
	f, _ := strconv.ParseFloat(s.String(), 64)
	return f
}

func (s *scanner) Floats64(l int) []float64 {
	if l == 0 {
		return []float64{}
	}
	sl := make([]float64, l, l)
	for i := range sl {
		sl[i] = s.Float64()
	}
	return sl
}

func (s *scanner) BigInt() *big.Int {
	n, _ := strconv.ParseInt(s.String(), 10, 64)
	return big.NewInt(n)
}

func (s *scanner) BigInts(l int) []*big.Int {
	if l == 0 {
		return []*big.Int{}
	}
	sl := make([]*big.Int, l, l)
	for i := range sl {
		sl[i] = s.BigInt()
	}
	return sl
}

func iabs(x int) int {
	if x < 0 {
		return -x
	}
	return x
}

func imax(x, y int) int {
	if x > y {
		return x
	}
	return y
}

func imin(x, y int) int {
	if x < y {
		return x
	}
	return y
}

func ipow(x, n int) int {
	if n == 0 {
		return 1
	}
	a := ipow(x, n>>1)
	a *= a
	if n&1 != 0 {
		a *= x
	}
	return a
}

func isum(X []int) int {
	s := 0
	for _, x := range X {
		s += x
	}
	return s
}

func chmax(x *int, v int) {
	if *x < v {
		*x = v
	}
}

func chmin(x *int, v int) {
	if *x > v {
		*x = v
	}
}

func factor(n int) map[int]int {
	m := map[int]int{}
	for i := 2; i*i <= n; i++ {
		for n%i == 0 {
			n /= i
			m[i]++
		}
	}
	if n != 1 {
		m[n]++
	}
	return m
}

var mod = 1000000007

func setMintMod(x int) {
	mod = x
}

type mint int

func newMint(v int) mint {
	return mint((v%mod + mod) % mod)
}

func (x mint) Add(y mint) mint {
	v := x + y
	if v >= mint(mod) {
		return v - mint(mod)
	}
	return v
}

func (x mint) Sub(y mint) mint {
	v := x + mint(mod) - y
	if v >= mint(mod) {
		return v - mint(mod)
	}
	return v
}

func (x mint) Mul(y mint) mint {
	return (x * y) % mint(mod)
}

func (x mint) pow(n int) mint {
	if n == 0 {
		return mint(1)
	}
	a := x.pow(n >> 1)
	a = a.Mul(a)
	if n&1 != 0 {
		a = a.Mul(x)
	}
	return a
}

func (x mint) Inverse() mint {
	return x.pow(mod - 2)
}

func (x mint) Div(y mint) mint {
	return x * y.Inverse()
}

func (x mint) Neg() mint {
	return newMint(int(-x))
}

type factorial struct {
	fact        []mint
	factInverse []mint
}

func newFactorial(n int) *factorial {
	f := new(factorial)
	f.init(n)
	return f
}

func (f *factorial) init(n int) {
	fact := make([]mint, n+1, n+1)
	fact[0] = newMint(1)
	for i := 1; i <= n; i++ {
		fact[i] = fact[i-1].Mul(newMint(i))
	}

	inv := make([]mint, n+1, n+1)
	inv[n] = fact[n].Inverse()
	for i := n; i >= 1; i-- {
		inv[i-1] = inv[i].Mul(newMint(i))
	}

	f.fact = fact
	f.factInverse = inv
}

func (f *factorial) Get(n int) mint {
	return f.fact[n]
}

func (f *factorial) GetInverse(n int) mint {
	return f.factInverse[n]
}

func (f *factorial) Permutation(n, k int) mint {
	if k < 0 || n < k {
		return 0
	}
	return f.fact[n].Mul(f.factInverse[n-k])
}

func (f *factorial) Combination(n, k int) mint {
	if k < 0 || n < k {
		return 0
	}
	return f.fact[n].Mul(f.factInverse[k]).Mul(f.factInverse[n-k])
}

type sieve struct {
	n          int
	primes     []int
	maxFactors []int
}

func newSieve(n int) *sieve {
	s := &sieve{
		n:          n,
		primes:     []int{},
		maxFactors: make([]int, n+1, n+1),
	}
	s.init()
	return s
}

func (s *sieve) init() {
	s.maxFactors[0] = -1
	s.maxFactors[1] = -1
	for i := 2; i <= s.n; i++ {
		if s.maxFactors[i] != 0 {
			continue
		}
		s.primes = append(s.primes, i)
		s.maxFactors[i] = i
		for j := i * i; j <= s.n; j += i {
			if s.maxFactors[j] == 0 {
				s.maxFactors[j] = i
			}
		}
	}
}

func (s *sieve) IsPrime(x int) bool {
	return s.maxFactors[x] == x
}

func (s *sieve) Factor(x int) map[int]int {
	m := map[int]int{}
	for x != 1 {
		m[s.maxFactors[x]]++
		x /= s.maxFactors[x]
	}
	return m
}


//go:generate echo "https://atcoder.jp/contests/abc146/tasks/abc146_a"
package main

import (
	"bufio"
	"io"
	"math/big"
	"os"
	"strconv"
)

var scan = newScanner(os.Stdin)

func Solve() {
	return
}

func main() {
	var s []int
	for {
		s = append(s, 1000000)
	}
}

type scanner struct {
	*bufio.Scanner
}

func newScanner(r io.Reader) *scanner {
	s := bufio.NewScanner(r)
	s.Split(bufio.ScanWords)
	s.Buffer(nil, 100000000)
	return &scanner{s}
}

func (s *scanner) String() string {
	s.Scan()
	return s.Text()
}

func (s *scanner) Strings(l int) []string {
	if l == 0 {
		return []string{}
	}
	sl := make([]string, l, l)
	for i := range sl {
		sl[i] = s.String()
	}
	return sl
}

func (s *scanner) Int() int {
	n, _ := strconv.Atoi(s.String())
	return n
}

func (s *scanner) Ints(l int) []int {
	if l == 0 {
		return []int{}
	}
	sl := make([]int, l, l)
	for i := range sl {
		sl[i] = s.Int()
	}
	return sl
}

func (s *scanner) Float64() float64 {
	f, _ := strconv.ParseFloat(s.String(), 64)
	return f
}

func (s *scanner) Floats64(l int) []float64 {
	if l == 0 {
		return []float64{}
	}
	sl := make([]float64, l, l)
	for i := range sl {
		sl[i] = s.Float64()
	}
	return sl
}

func (s *scanner) BigInt() *big.Int {
	n, _ := strconv.ParseInt(s.String(), 10, 64)
	return big.NewInt(n)
}

func (s *scanner) BigInts(l int) []*big.Int {
	if l == 0 {
		return []*big.Int{}
	}
	sl := make([]*big.Int, l, l)
	for i := range sl {
		sl[i] = s.BigInt()
	}
	return sl
}

func iabs(x int) int {
	if x < 0 {
		return -x
	}
	return x
}

func imax(x, y int) int {
	if x > y {
		return x
	}
	return y
}

func imin(x, y int) int {
	if x < y {
		return x
	}
	return y
}

func ipow(x, n int) int {
	if n == 0 {
		return 1
	}
	a := ipow(x, n>>1)
	a *= a
	if n&1 != 0 {
		a *= x
	}
	return a
}

func isum(X []int) int {
	s := 0
	for _, x := range X {
		s += x
	}
	return s
}

func chmax(x *int, v int) {
	if *x < v {
		*x = v
	}
}

func chmin(x *int, v int) {
	if *x > v {
		*x = v
	}
}

func factor(n int) map[int]int {
	m := map[int]int{}
	for i := 2; i*i <= n; i++ {
		for n%i == 0 {
			n /= i
			m[i]++
		}
	}
	if n != 1 {
		m[n]++
	}
	return m
}

var mod = 1000000007

func setMintMod(x int) {
	mod = x
}

type mint int

func newMint(v int) mint {
	return mint((v%mod + mod) % mod)
}

func (x mint) Add(y mint) mint {
	v := x + y
	if v >= mint(mod) {
		return v - mint(mod)
	}
	return v
}

func (x mint) Sub(y mint) mint {
	v := x + mint(mod) - y
	if v >= mint(mod) {
		return v - mint(mod)
	}
	return v
}

func (x mint) Mul(y mint) mint {
	return (x * y) % mint(mod)
}

func (x mint) pow(n int) mint {
	if n == 0 {
		return mint(1)
	}
	a := x.pow(n >> 1)
	a = a.Mul(a)
	if n&1 != 0 {
		a = a.Mul(x)
	}
	return a
}

func (x mint) Inverse() mint {
	return x.pow(mod - 2)
}

func (x mint) Div(y mint) mint {
	return x * y.Inverse()
}

func (x mint) Neg() mint {
	return newMint(int(-x))
}

type factorial struct {
	fact        []mint
	factInverse []mint
}

func newFactorial(n int) *factorial {
	f := new(factorial)
	f.init(n)
	return f
}

func (f *factorial) init(n int) {
	fact := make([]mint, n+1, n+1)
	fact[0] = newMint(1)
	for i := 1; i <= n; i++ {
		fact[i] = fact[i-1].Mul(newMint(i))
	}

	inv := make([]mint, n+1, n+1)
	inv[n] = fact[n].Inverse()
	for i := n; i >= 1; i-- {
		inv[i-1] = inv[i].Mul(newMint(i))
	}

	f.fact = fact
	f.factInverse = inv
}

func (f *factorial) Get(n int) mint {
	return f.fact[n]
}

func (f *factorial) GetInverse(n int) mint {
	return f.factInverse[n]
}

func (f *factorial) Permutation(n, k int) mint {
	if k < 0 || n < k {
		return 0
	}
	return f.fact[n].Mul(f.factInverse[n-k])
}

func (f *factorial) Combination(n, k int) mint {
	if k < 0 || n < k {
		return 0
	}
	return f.fact[n].Mul(f.factInverse[k]).Mul(f.factInverse[n-k])
}

type sieve struct {
	n          int
	primes     []int
	maxFactors []int
}

func newSieve(n int) *sieve {
	s := &sieve{
		n:          n,
		primes:     []int{},
		maxFactors: make([]int, n+1, n+1),
	}
	s.init()
	return s
}

func (s *sieve) init() {
	s.maxFactors[0] = -1
	s.maxFactors[1] = -1
	for i := 2; i <= s.n; i++ {
		if s.maxFactors[i] != 0 {
			continue
		}
		s.primes = append(s.primes, i)
		s.maxFactors[i] = i
		for j := i * i; j <= s.n; j += i {
			if s.maxFactors[j] == 0 {
				s.maxFactors[j] = i
			}
		}
	}
}

func (s *sieve) IsPrime(x int) bool {
	return s.maxFactors[x] == x
}

func (s *sieve) Factor(x int) map[int]int {
	m := map[int]int{}
	for x != 1 {
		m[s.maxFactors[x]]++
		x /= s.maxFactors[x]
	}
	return m
}


//go:generate echo "https://atcoder.jp/contests/abc146/tasks/abc146_a"
package main

import (
	"bufio"
	"fmt"
	"io"
	"math/big"
	"os"
	"strconv"
)

var scan = newScanner(os.Stdin)

func Solve() {
	return
}

func main() {
	var s []int
	fmt.Println(s[2])
}

type scanner struct {
	*bufio.Scanner
}

func newScanner(r io.Reader) *scanner {
	s := bufio.NewScanner(r)
	s.Split(bufio.ScanWords)
	s.Buffer(nil, 100000000)
	return &scanner{s}
}

func (s *scanner) String() string {
	s.Scan()
	return s.Text()
}

func (s *scanner) Strings(l int) []string {
	if l == 0 {
		return []string{}
	}
	sl := make([]string, l, l)
	for i := range sl {
		sl[i] = s.String()
	}
	return sl
}

func (s *scanner) Int() int {
	n, _ := strconv.Atoi(s.String())
	return n
}

func (s *scanner) Ints(l int) []int {
	if l == 0 {
		return []int{}
	}
	sl := make([]int, l, l)
	for i := range sl {
		sl[i] = s.Int()
	}
	return sl
}

func (s *scanner) Float64() float64 {
	f, _ := strconv.ParseFloat(s.String(), 64)
	return f
}

func (s *scanner) Floats64(l int) []float64 {
	if l == 0 {
		return []float64{}
	}
	sl := make([]float64, l, l)
	for i := range sl {
		sl[i] = s.Float64()
	}
	return sl
}

func (s *scanner) BigInt() *big.Int {
	n, _ := strconv.ParseInt(s.String(), 10, 64)
	return big.NewInt(n)
}

func (s *scanner) BigInts(l int) []*big.Int {
	if l == 0 {
		return []*big.Int{}
	}
	sl := make([]*big.Int, l, l)
	for i := range sl {
		sl[i] = s.BigInt()
	}
	return sl
}

func iabs(x int) int {
	if x < 0 {
		return -x
	}
	return x
}

func imax(x, y int) int {
	if x > y {
		return x
	}
	return y
}

func imin(x, y int) int {
	if x < y {
		return x
	}
	return y
}

func ipow(x, n int) int {
	if n == 0 {
		return 1
	}
	a := ipow(x, n>>1)
	a *= a
	if n&1 != 0 {
		a *= x
	}
	return a
}

func isum(X []int) int {
	s := 0
	for _, x := range X {
		s += x
	}
	return s
}

func chmax(x *int, v int) {
	if *x < v {
		*x = v
	}
}

func chmin(x *int, v int) {
	if *x > v {
		*x = v
	}
}

func factor(n int) map[int]int {
	m := map[int]int{}
	for i := 2; i*i <= n; i++ {
		for n%i == 0 {
			n /= i
			m[i]++
		}
	}
	if n != 1 {
		m[n]++
	}
	return m
}

var mod = 1000000007

func setMintMod(x int) {
	mod = x
}

type mint int

func newMint(v int) mint {
	return mint((v%mod + mod) % mod)
}

func (x mint) Add(y mint) mint {
	v := x + y
	if v >= mint(mod) {
		return v - mint(mod)
	}
	return v
}

func (x mint) Sub(y mint) mint {
	v := x + mint(mod) - y
	if v >= mint(mod) {
		return v - mint(mod)
	}
	return v
}

func (x mint) Mul(y mint) mint {
	return (x * y) % mint(mod)
}

func (x mint) pow(n int) mint {
	if n == 0 {
		return mint(1)
	}
	a := x.pow(n >> 1)
	a = a.Mul(a)
	if n&1 != 0 {
		a = a.Mul(x)
	}
	return a
}

func (x mint) Inverse() mint {
	return x.pow(mod - 2)
}

func (x mint) Div(y mint) mint {
	return x * y.Inverse()
}

func (x mint) Neg() mint {
	return newMint(int(-x))
}

type factorial struct {
	fact        []mint
	factInverse []mint
}

func newFactorial(n int) *factorial {
	f := new(factorial)
	f.init(n)
	return f
}

func (f *factorial) init(n int) {
	fact := make([]mint, n+1, n+1)
	fact[0] = newMint(1)
	for i := 1; i <= n; i++ {
		fact[i] = fact[i-1].Mul(newMint(i))
	}

	inv := make([]mint, n+1, n+1)
	inv[n] = fact[n].Inverse()
	for i := n; i >= 1; i-- {
		inv[i-1] = inv[i].Mul(newMint(i))
	}

	f.fact = fact
	f.factInverse = inv
}

func (f *factorial) Get(n int) mint {
	return f.fact[n]
}

func (f *factorial) GetInverse(n int) mint {
	return f.factInverse[n]
}

func (f *factorial) Permutation(n, k int) mint {
	if k < 0 || n < k {
		return 0
	}
	return f.fact[n].Mul(f.factInverse[n-k])
}

func (f *factorial) Combination(n, k int) mint {
	if k < 0 || n < k {
		return 0
	}
	return f.fact[n].Mul(f.factInverse[k]).Mul(f.factInverse[n-k])
}

type sieve struct {
	n          int
	primes     []int
	maxFactors []int
}

func newSieve(n int) *sieve {
	s := &sieve{
		n:          n,
		primes:     []int{},
		maxFactors: make([]int, n+1, n+1),
	}
	s.init()
	return s
}

func (s *sieve) init() {
	s.maxFactors[0] = -1
	s.maxFactors[1] = -1
	for i := 2; i <= s.n; i++ {
		if s.maxFactors[i] != 0 {
			continue
		}
		s.primes = append(s.primes, i)
		s.maxFactors[i] = i
		for j := i * i; j <= s.n; j += i {
			if s.maxFactors[j] == 0 {
				s.maxFactors[j] = i
			}
		}
	}
}

func (s *sieve) IsPrime(x int) bool {
	return s.maxFactors[x] == x
}

func (s *sieve) Factor(x int) map[int]int {
	m := map[int]int{}
	for x != 1 {
		m[s.maxFactors[x]]++
		x /= s.maxFactors[x]
	}
	return m
}


st = gets.chomp

case st
when "SUN" then
  puts 7
when "MON" then
  puts 6
when "TUE" then
  puts 5
when "WED" then
  puts 4
when "THU" then
  puts 3
when "FRI" then
  puts 2
else
  puts 1
end


day = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
puts 7 - day.find_index(gets.chomp)


S = gets.chomp
a = [0, "SAT", "FRI", "THU", "WED", "TUE", "MON", "SUN"]

print a.index(S)


a=[:SAT,:FRI,:THU,:WED,:TUE,:MON,:SUN]
p a.index(gets.to_sym)+1


week = {"SUN":7,"MON":6,"TUE":5,"WED":4,"THU":3,"FRI":2,"SAT":1}
puts week[gets.chomp]


h = {"SUN"=>7,"MON"=>6,"TUE"=>5,"WED"=>4,"THU"=>3,"FRI"=>2,"SAT"=>1}
s = gets
p h[s]


fn main() {
    let s: String = read_line_as_value();
    let ans = match &*s {
        "SUN" => 7,
        "MON" => 6,
        "TUE" => 5,
        "WED" => 4,
        "THU" => 3,
        "FRI" => 2,
        "SAT" => 1,
        _ => -1
    };
    println!("{}", ans);
}

fn read_line_as_value<T: std::str::FromStr>() -> T {
    let mut input = String::new();
    let res = std::io::stdin().read_line(&mut input);
    if let Err(error) = res {
        panic!("io error at stdin.read_line: {}", error);
    };
    match input.trim().parse() {
        Ok(val) => val,
        _ => panic!("error while parsing input: {}", input)
    }
}


use std::io::*;
fn main() {
    let mut s: String = String::new();
    std::io::stdin().read_to_string(&mut s).ok();
    let mut itr = s.trim().split_whitespace();
    let s = itr.next().unwrap();
    println!(
        "{}",
        match s {
            "SUN" => 7,
            "MON" => 6,
            "TUE" => 5,
            "WED" => 4,
            "THU" => 3,
            "FRI" => 2,
            _ => 1,
        }
    );
}


use std::io::Read;

fn main() {
    let mut buf = String::new();
    std::io::stdin().read_to_string(&mut buf).unwrap();

    let answer = solve(&buf);

    println!("{}", answer);
}

fn solve(input: &str) -> String {
    let mut iterator = input.split_whitespace();

    let s: &str = iterator.next().unwrap();

    let ans = match s {
        "SUN" => 7,
        "MON" => 6,
        "TUE" => 5,
        "WED" => 4,
        "THU" => 3,
        "FRI" => 2,
        "SAT" => 1,
        _ => 0,
    };

    return ans.to_string();
}


macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input! {
    	s:chars
    }
    let ss = s.into_iter().collect::<String>();
    println!("{}",
             match ss.trim() {
                 "SUN" => "MON",
                 "MON" => "TUE",
                 "TUE" => "WED",
                 "WED" => "THU",
                 "THU" => "FRI",
                 "FRI" => "SAT",
                 "SAT" => "SUN",
                 _ => "MON"
             });
}


macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input! {
    	s:chars
    }
    let ss: str = s.into_iter().collect::<String>();
    println!("{}",
    match &ss {
    "SUN" => "MON",
    "MON" => "TUE",
    "TUE" => "WED",
    "WED" => "THU",
    "THU" => "FRI",
    "FRI" => "SAT",
    "SAT" => "SUN",
    _ => "MON"
    });
}


macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input! {
    	s:chars
    }
    let ss = s.into_iter().collect::<String>();
    println!("{}",
    match &ss {
    "SUN".to_string() => "MON",
    "MON" => "TUE",
    "TUE" => "WED",
    "WED" => "THU",
    "THU" => "FRI",
    "FRI" => "SAT",
    "SAT" => "SUN",
    _ => "MON"
    });
}


var week: [String: Int]
week = [:]
week["SUN"] = 7
week["MON"] = 6
week["TUE"] = 5
week["WED"] = 4
week["THU"] = 3
week["FRI"] = 2
week["SAT"] = 1

let s = readLine()!
print(week[s]!)


func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

let ans=readLine()!
let week=["SUN","MON","TUE","WED","THU","FRI","SAT"]
var num=0
for s in week{
  if(ans==s){print(7-num)}
  num+=1
}


func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func main() {
    let ans = [
        "SUN": 7,
        "MON": 6,
        "TUE": 5,
        "WED": 4,
        "THU": 3,
        "FRI": 2,
        "SAT": 1,
    ]
    let s = readLine()!
    print(ans[s]!)
}

main()


let a = readLine()!
let jour = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
var b = 0
for c in jour {
  if(a==c) {
    print(7-b)
  b += 1
  }
}


let date=["SUN","MON","TUE","WED","THU","FRI","SAT"]
let s=readLine()!
let indexs=date.index(of: s)
print(7-indexs)


let date=["SUN","MON","TUE","WED","THU","FRI","SAT"]
let s=readLine()!
indexs=Int(date.index(of: s))
print(7-indexs)


import * as fs from "fs";

const input = (fs.readFileSync("/dev/stdin", "utf8") as string).split("\n");
//const n = +input[0];
//const a = [];
//for(let i=0;i<n;i++){
//	a.push(input[i+1].split(" ").map((x:string):number=>+x));
//}

//const [n, m] = input[0].split(" ").map((x: string): number => +x);
//const a = input[1].split(" ").map((x: string): number => +x);

function compareFunc(a, b){
    return a-b;
}

const s: string = input[0];
const li: string[] = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'];

for(let i = 0; i < 7; i++){
    if (li[i] === s){
        console.log(7-i)
    }
}


'use strict'
function Main(input) {
  const lines = input.split('\n');
  const day = lines[0];
  const days = ['SUN','MON','TUE','WED','THU','FRI','SAT'];

  console.log(7 - days.indexOf(day));
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));


'use strict'
function Main(input) {
  	const lines = input.split('\n');
  	const day = lines.shift();
	const days = ['SUN','MON','TUE','WED','THU','FRI','SAT'];

	console.log(7 - days.indexOf(day));
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));


export class Main {
  main(input: string) {
    const tmp: string[] = input.split("\n");
    const s: string = tmp.shift();

    switch (s) {
      case 'SUN':
        return 0;
      case 'MON':
        return 6;
      case 'TUE':
        return 5;
      case 'WED':
        return 4;
      case 'THU':
        return 3;
      case 'FRI':
        return 2;
      case 'SAT':
        return 1;
    }
  }
}

console.log(new Main().main(require("fs").readFileSync("/dev/stdin", "utf8")));


function Main(input: string) {
  const lines: string[] = input.split('\n');
  const params1 = lines[0].split(' ');

  const a = parseInt(params1[0]);
  const b = parseInt(params1[1]);
  const x = parseInt(params1[2]);

  const cost = (n: number) => a * n + (b * digit(n));

  let biggest = 0;
  if (cost(1) > x) {
    biggest = 0;
  } else if (cost(x) <= x) {
    biggest = x;
  } else {
    let low = 1;
    let high = x;
    while (high - low >= 2) {
      const mid = Math.floor((low + high) / 2);
      if (cost(mid) <= x) {
        low = mid;
      } else {
        high = mid;
      }
    }
    biggest = low;
  }

  console.log(biggest);
}

function digit(n: number): number {
  let cnt = 1;
  for (let i = 10; i <= n; i *= 10) cnt++;
  return cnt
}

Main(require('fs').readFileSync('/dev/stdin', 'utf8'));


function main(input){
    const args=input.split(' ');
    var array=['SAT','FRI','THU','WED','TUE','MON','SUN'];
    var ans=array.indexOf(args[0])+1;
    console.log(ans);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


#!/usr/bin/env python3
# -*- coding: utf-8 -*-

A, B = map(int, input().split())

if A%3 is 0 or B%3 is 0 or (A+B)%3 is 0:
    print('Possible')
else:
    print('Impossible')


a, b = map(int, input().split())

if a%3==0 or b%3==0 or (a+b)%3 == 0:
    print("Possible")
else:
    print("Impossible")


a,b = map(int,input().split())

if a % 3 == 0 or b % 3 == 0 or (a+b) % 3 == 0:
    print('Possible')
else:
    print('Impossible')


a,b = map(int,input().split())

if a % 3 == 0 or b % 3 == 0 or (a+b) % 3 == 0:
  print('Possible')
else:
  pritn('Impossible')


a,b = map(int,input().split())

if a % 3 == 0 or b % 3 == 0 or (a + b) % 3 == 0:
    print('Possible')
else:
    print('Impossibble')


a,b = map(int,input().split())

if a % 3 == 0 or b % 3 == 0 or (a + b) % 3 == 0:
    print('Possible')
else:
    print('Imposibble')


import java.io.*;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    String[] data = br.readLine().split(" ");
    int a = Integer.parseInt(data[0]);
    int b = Integer.parseInt(data[1]);

    if (a%3 != 0 && b%3 != 0 && (a+b)%3 != 0){
      System.out.println("Impossible");
    } else {
      System.out.println("Possible");
    }
  }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) {
        try {
            // 標準入力
            InputStreamReader isr = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(isr);
            String str[] = br.readLine().split(" ");
            int a = Integer.parseInt(str[0]);
            int b = Integer.parseInt(str[1]);
            if (a % 3 == 0 || b % 3 == 0 || (a + b) % 3 == 0) {
                System.out.println("Possible");
            } else {
                System.out.println("Impossible");
            }
        } catch (IOException e) {
            e.printStackTrace();
           }
    }
}


import java.io.*;
import java.util.*;

public class Main {

	final static long MOD = 1000000007;
	public static String[] Ws = null;
	public static int wsIndx = 0;
	public static BufferedReader in = null;
	public static void main(String[] args) throws Exception {
		solution(args);
		if(in!=null){
			in.close();
		}
	}

	public static void solution(String[] args) throws Exception{

		int A = nextInt();
		int B = nextInt();

		String ans = "Impossible";
		if(A%3==0||B%3==0||(A+B)%3==0)
			ans="Possible";
		System.out.println(ans);

	}

	public static boolean isPalindromicStr(String s) {
		int h = 0;
		int t = s.length() - 1;
		while (h <= t) {
			if (s.charAt(h) != s.charAt(t)) {
				break;
			}
			h++;
			t--;
		}
		if (h > t) {
			return true;
		}
		return false;
	}
	public static String[] toStringArray(String s) {
		String[] tmp = new String[s.length()];
		char[] c = s.toCharArray();
		for (int i = 0; i < tmp.length; i++) {
			tmp[i] = String.valueOf(c[i]);
		}
		return tmp;
	}

	public static void check() throws Exception{
		if(in == null){
			in = new BufferedReader(new InputStreamReader(System.in));
		}
		if(Ws==null || Ws.length<=wsIndx){
			Ws = in.readLine().split(" ");
			wsIndx=0;
		}
	}
	public static int nextInt()throws Exception{
		check();
		return Integer.parseInt(Ws[wsIndx++]);
	}

	public static long nextLong()throws Exception{
		check();
		return Long.parseLong(Ws[wsIndx++]);
	}

	public static String nextString()throws Exception{
		check();
		return Ws[wsIndx++];
	}

	public static int[] nextInts()throws Exception{
		check();
		int[] tmp = new int[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Integer.parseInt(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static long[] nextLongs()throws Exception{
		check();
		long[] tmp = new long[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Long.parseLong(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static String[] nextStrings()throws Exception{
		check();
		wsIndx=Ws.length;
		return Ws;
	}

}


import java.util.*;
// warm-up
public class Main {

	static void solve() {
		Scanner sc = new Scanner(System.in);
		System.out.println((sc.nextInt()+sc.nextInt())%3==0 ? "Possible" : "Impossible");
		sc.close();
	}

	public static void main(String args[]) {
		solve();
	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) throws IOException {
        Scanner s = new Scanner(System.in);
        System.out.println((s.nextInt()+s.nextInt())%3==0?"Possible":"Impossible");
    }

}

class Scanner
{
    StringTokenizer st;
    BufferedReader br;

    public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

    public String next() throws IOException
    {
        while (st == null || !st.hasMoreTokens())
            st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

    public int nextInt() throws IOException {return Integer.parseInt(next());}

    public long nextLong() throws IOException {return Long.parseLong(next());}

    public String nextLine() throws IOException {return br.readLine();}

    public double nextDouble() throws IOException
    {
        String x = next();
        StringBuilder sb = new StringBuilder("0");
        double res = 0, f = 1;
        boolean dec = false, neg = false;
        int start = 0;
        if(x.charAt(0) == '-')
        {
            neg = true;
            start++;
        }
        for(int i = start; i < x.length(); i++)
            if(x.charAt(i) == '.')
            {
                res = Long.parseLong(sb.toString());
                sb = new StringBuilder("0");
                dec = true;
            }
            else
            {
                sb.append(x.charAt(i));
                if(dec)
                    f *= 10;
            }
        res += Long.parseLong(sb.toString()) / f;
        return res * (neg?-1:1);
    }

    public boolean ready() throws IOException {return br.ready();}

}


import java.util.*;
import java.io.*;

public class Main {
    static final StdIn sc = new StdIn();
    static final PrintWriter out = new PrintWriter(System.out);
    static final int mod = 1000000007;

    public static void main(String[] args) {
        solve();
        out.close();
    }

    static void solve() {
        int a = sc.nextInt();
        int b = sc.nextInt();
        if ((a + b) % 3 == 0) {
            out.println("Possible");
        } else {
            out.println("Impossible");
        }

    }

    static class StdIn {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public StdIn() {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public StdIn(InputStream in) {
            try {
                din = new DataInputStream(in);
            } catch (Exception e) {
                throw new RuntimeException();
            }
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String next() {
            int c;
            while ((c = read()) != -1 && (c == ' ' || c == '\n' || c == '\r'))
                ;
            StringBuilder s = new StringBuilder();
            while (c != -1) {
                if (c == ' ' || c == '\n' || c == '\r')
                    break;
                s.append((char) c);
                c = read();
            }
            return s.toString();
        }

        public String nextLine() {
            int c;
            while ((c = read()) != -1 && (c == ' ' || c == '\n' || c == '\r'))
                ;
            StringBuilder s = new StringBuilder();
            while (c != -1) {
                if (c == '\n' || c == '\r')
                    break;
                s.append((char) c);
                c = read();
            }
            return s.toString();
        }

        public int nextInt() {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
                ret = ret * 10 + c - '0';
            while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
                ret = ret * 10 + c - '0';
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
                ret = ret * 10 + c - '0';
            while ((c = read()) >= '0' && c <= '9');
            if (c == '.')
                while ((c = read()) >= '0' && c <= '9')
                    ret += (c - '0') / (div *= 10);
            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() {
            try {
                if (bufferPointer == bytesRead)
                    fillBuffer();
                return buffer[bufferPointer++];
            } catch (IOException e) {
                throw new RuntimeException();
            }
        }

        public void close() throws IOException {
            if (din == null)
                return;
            din.close();
        }
    }
}


#include<cstdio>
#include<cstring>
#include<algorithm>
int a,b;
template<class T>
inline void read(T&a){
	char c=getchar();
	for(a=0;c<'0'||c>'9';c=getchar());
	for(;c>='0'&&c<='9';c=getchar())a=a*10+c-'0';
}
int main(){
	read(a),read(b);
	if(a%3==0||b%3==0||(a+b)%3==0)puts("Possible");
	else puts("Impossible");
	return 0;
}


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <ctype.h>
#include <limits.h>
using namespace std;
int in(void){
	int i;scanf("%d",&i);
	return i;
}
int main(void){
	int a=in(),b=in();
	if(a%3==0||b%3==0||(a+b)%3==0){
		puts("Possible");
	}
	else{
		puts("Impossible");
	}
	return 0;
}


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <ctype.h>
#include <limits.h>
#define inf (INT_MAX-1)
#define INF 9223372036854775807
#define sq(n) ((n)*(n))
#define rep(i,n) for(i=0;i<n;i++)
#define rev(i,n) for(i=n-1;i>=0;i--)
const int mod=(int)1e09+7;

int in(void){
	int i;scanf("%d",&i);
	return i;
}
long long llin(void){
	long long i;scanf("%lld",&i);
	return i;
}
double din(void){
	double i;scanf("%lf",&i);
	return i;
}
void chin(char s[]){
	scanf("%s",s);
}
void print(int a){
	printf("%d\n",a);
}
void llprint(long long a){
	printf("%lld\n",a);
}
void dprint(double a){
	printf("%.10f\n",a);
}
void print2(int a,int b){
	printf("%d %d\n",a,b);
}
long long max(long long a,long long b){
	return a>b?a:b;
}
long long min(long long a,long long b){
	return a<b?a:b;
}
double dmax(double a,double b){
	return a>b?a:b;
}
int cmp(const void *a,const void *b){
	return *(long long *)a-*(long long *)b;
}

int main(void){
	int a=in(),b=in();
	if(a%3==0||b%3==0||(a+b)%3==0){
		puts("Possible");
	}
	else{
		puts("Impossible");
	}
	return 0;
}


 #include <iostream>
 #include <math.h>
 #include <bits/stdc++.h>
  using namespace std;

 int main()
     {
    int t,n,ones=0,res=0;
    cin>>t;
    for(int i=0;i<t;i++)
    {
        cin>>n;
        for(int j=0;n>0;j++)
        {
            if(n%2!=0)
            ones++;
               n=n/2;
        }
        for(int g=0;g<ones;g++)
        {
            res+=pow(2,g);
        }
        cout<<res<<endl;
        res=0;
        ones=0;
    }
   return 0;
     }


 #include <iostream>
 #include <math.h>
 #include <bits/stdc++.h>
  using namespace std;

 int main()
     {
 int a,b;
 cin>>a>>b;
 int sum=a+b;

 if(sum%3==0)
    cout<<"Possible";
 else cout<<"Impossible";
   return 0;
     }


 #include <iostream>
 #include <math.h>
 #include <bits/stdc++.h>
  using namespace std;

 int main()
     {
 int a,b;
 cin>>a>>b;
 if((a+b)>=3)
    cout<<"Possible";
 else cout<<"Impossible";
   return 0;
     }


#include <stdio.h>

int main(void)
{
  int a, b;
  scanf("%d %d", &a, &b);
  if ( a % 3 == 0 || b % 3 == 0 || (a+b) % 3 == 0 ) {
    puts("Possible");
  } else {
    puts("Impossible");
  }
  return 0;
}


#include<stdio.h>
int main(void){
    int a,b,ab;
    scanf("%d %d",&a,&b);
    ab=a+b;
    if(a%3==0||b%3==0||ab%3==0){
        printf("Possible\n");
    }else{
        printf("Impossible\n");
    }
    return 0;
}


#include <stdio.h>

int main(void) {
		int a,b;
		scanf("%d %d",&a,&b);
		if(a%3==0)
			printf("Possible");
		if(b%3==0)
			printf("Possible");
		if((a+b)%3==0)
			printf("Possible");
		else
			printf("Impossible");

	return 0;
}


#include <stdio.h>

int main(void) {
		int a,b;
		scanf("%d %d",&a,&b);
		if((a+b)%3==0)
			printf("Possible");
		else
			printf("Impossible");

	return 0;
}


#include<stdio.h>
int main()
{
    int a,b,n;
    scanf("%d%d",&a,&b);
    n=a+b;
    if(n%3!=0){
        printf("Impossible\n");
    }
    else{
        printf("Possible\n");
    }
    return 0;
}


'use strict'

function main(s) {

  s = s.split('\n')[0].split(' ').map(n => Number(n));
  const a = s[0];
  const b = s[1];

  const ans = a % 3 === 0 || b % 3 === 0 || (a + b) % 3 === 0;

  console.log(ans ? 'Possible' : 'Impossible');
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));


function main (s) {
    s=s.split(" ");
	for(var i=0;i<2;i++)s[i]=parseInt(s[i]);
	if(s[0]%3==0||s[1]%3==0||(s[0]+s[1])%3==0)console.log("Possible\n");
	else console.log("Impossible\n");
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));


'use strict';

function Main(INPUT) {
    const input = INPUT.split("\n")[0].split(" ");
    const A = parseInt(input[0], 10);
    const B = parseInt(input[1], 10);

    if (A % 3 == 0 || B % 3 == 0 || (A + B) % 3 == 0) {
        console.log("Possible");
    } else {
        console.log("Impossible");
    }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function main(input) {
  input = input.trim();
  const [a,b] = input.split(" ").map(Number);

  if((a+b)%3==0){
    console.log("Possible");
  }else{
    console.log("Impossible");
  }
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));


function Main(input) {
  const numbers = input.split(' ').map(n => Number(n));
  const a = numbers[0];
  const b = numbers[1];
  if(a % 3 === 0 || b % 3 === 0 || a + b % 3 === 0) {
    console.log('Possible');
  } else {
    console.log('Impossible')
  }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));


const Main = (input) => {
	var xs = input.trim().split(' ').map(v=>parseInt(v,10));
    var ans = xs[0] + xs[1];
    //console.log(xs);
    if(ans % 3 === 0){
    	console.log('Possible');
    }else if(ans % 3 !== 0){
    	console.log('Impossible');
    }

}
Main(require('fs').readFileSync('/dev/stdin','utf8'));


package main

import (
	"bufio"
	"fmt"
	"io"
	"os"
)

type contest struct {
	in  io.Reader
	out io.Writer
}

func (con *contest) Scan(a ...interface{}) (int, error) {
	return fmt.Fscan(con.in, a...)
}
func (con *contest) Scanln(a ...interface{}) (int, error) {
	return fmt.Fscanln(con.in, a...)
}
func (con *contest) Scanf(f string, a ...interface{}) (int, error) {
	return fmt.Fscanf(con.in, f, a...)
}
func (con *contest) Print(a ...interface{}) (int, error) {
	return fmt.Fprint(con.out, a...)
}
func (con *contest) Println(a ...interface{}) (int, error) {
	return fmt.Fprintln(con.out, a...)
}
func (con *contest) Printf(f string, a ...interface{}) (int, error) {
	return fmt.Fprintf(con.out, f, a...)
}
func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	con := &contest{in: in, out: out}
	con.main()
}

func (con *contest) main() error {
	var a, b int
	con.Scan(&a, &b)
	if a%3 == 0 || b%3 == 0 || (a+b)%3 == 0 {
		con.Println("Possible")
	} else {
		con.Println("Impossible")
	}
	return nil
}


package main

import (
	"fmt"
)

func main() {
	var a, b int
	fmt.Scan(&a, &b)

	if (a+b)%3 == 0 || a%3 == 0 || b%3 == 0 {
		fmt.Println("Possible")
	} else {
		fmt.Println("Impossible")
	}
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

func out(x ...interface{}) {
	fmt.Println(x...)
}

var sc = bufio.NewScanner(os.Stdin)

func getInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func getString() string {
	sc.Scan()
	return sc.Text()
}

// min, max, asub, absなど基本関数
func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func asub(a, b int) int {
	if a > b {
		return a - b
	}
	return b - a
}

func abs(a int) int {
	if a >= 0 {
		return a
	}
	return -a
}

func lowerBound(a []int, x int) int {
	idx := sort.Search(len(a), func(i int) bool {
		return a[i] >= x
	})
	return idx
}

func upperBound(a []int, x int) int {
	idx := sort.Search(len(a), func(i int) bool {
		return a[i] > x
	})
	return idx
}

func main() {
	sc.Split(bufio.ScanWords)
	A, B := getInt(), getInt()

	if A%3 == 0 || B%3 == 0 || (A+B)%3 == 0 {
		out("Possible")
	} else {
		out("Impossible")
	}
}


package main

import (
	"fmt"
)

func main() {
	var A, B int
	var ans string
	fmt.Scan(&A, &B)

	if (A+B)%3 == 0 {
		ans = "Possible"
	} else {
		ans = "Impossible"
	}

	fmt.Println(ans)
}


package main

import "fmt"

func main(){
  var a, b int
  fmt.Scan(&a, &b)
  if a%3 == 0 || b%3 == 0 || (a+b)%3 == 0{
    fmt.Println("Possible")
  }else{
    fmt.Println"(Impossible")
  }
}


package main

import "fmt"

func main() {
	var a, b int
	fmt.Scan(&a, &b)
	if (a + b) % 3 == 0 {
		fmt.Println("Possible")
	} else {
		fmt.Println("Impossible")
	}
}


a, b = gets.chomp.split(" ").map(&:to_i)
if a % 3 == 0 || b % 3 == 0 then
    puts "Possible"
elsif (a + b) % 3 == 0 then
    puts "Possible"
else
    puts "Impossible"
end


a, b = gets.split(" ").map(&:to_i)
puts a * b * (a + b) % 3 == 0 ? :Possible : :Impossible


a, b = gets.chomp.split(" ").map(&:to_i)
ans = a % 3 == 0 || b % 3 == 0 || (a+b) % 3 == 0
puts ans ? "Possible" : "Impossible"


a,b = gets.chop.split.map(&:to_i)
[a,b,a+b].each do |x|
    if x%3 == 0
        puts 'Possible'
        exit!
    end
end
puts 'Impossible'


a = gets.to_i
b = gets.to_i
while a<1 or 100<b
  a = gets.to_i
  b = gets.to_i
end
if a+b <= 2 then
  puts("Impossible")
if a+b % 3 == 0 then
	puts("Possible")
elsif a % 3 == 0 then
    puts("Possible")
elsif b % 3 == 0 then
	puts("Possible")
else
  puts("Impossible")
end


a = gets.to_i
b = gets.to_i
while a<1 or 100<b
  a = gets.to_i
  b = gets.to_i
end
if a+b % 3 == 0 then
	puts("Possible")
elsif a % 3 == 0 then
    puts("Possible")
elsif b % 3 == 0 then
	puts("Possible")
else
  puts("Impossible")
end