import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;

void main() {
  int x;
  readf (" %d", &x);
  auto a = new bool[x + 1];
  a[0] = true;
  foreach (t; 100 .. 106) {
    foreach (i; t .. x + 1) {
      if (a[i - t]) {
        a[i] = true;
      }
    }
  }
  writeln (a[x] ? 1 : 0);
}

